GTSAM  4.0.2
C++ library for smoothing and mapping (SAM)
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
gtsam::GraphvizFormatting Struct Reference

#include <GraphvizFormatting.h>

Inheritance diagram for gtsam::GraphvizFormatting:
Inheritance graph
[legend]
Collaboration diagram for gtsam::GraphvizFormatting:
Collaboration graph
[legend]

Public Types

enum  Axis {
  X, Y, Z, NEGX,
  NEGY, NEGZ
}
 World axes to be assigned to paper axes.
 

Public Member Functions

 GraphvizFormatting ()
 
Vector2 findBounds (const Values &values, const KeySet &keys) const
 
std::optional< Vector2 > extractPosition (const Value &value) const
 Extract a Vector2 from either Vector2, Pose2, Pose3, or Point3.
 
std::optional< Vector2 > variablePos (const Values &values, const Vector2 &min, Key key) const
 Return affinely transformed variable position if it exists.
 
std::optional< Vector2 > factorPos (const Vector2 &min, size_t i) const
 Return affinely transformed factor position if it exists.
 
void graphPreamble (std::ostream *os) const
 Write out preamble for graph, including size.
 
void digraphPreamble (std::ostream *os) const
 Write out preamble for digraph, including size.
 
void drawVariable (Key key, const KeyFormatter &keyFormatter, const std::optional< Vector2 > &position, std::ostream *os) const
 Create a variable dot fragment.
 
std::optional< Vector2 > variablePos (Key key) const
 Return variable position or none.
 
void processFactor (size_t i, const KeyVector &keys, const KeyFormatter &keyFormatter, const std::optional< Vector2 > &position, std::ostream *os) const
 Draw a single factor, specified by its index i and its variable keys.
 

Static Public Member Functions

static void DrawFactor (size_t i, const std::optional< Vector2 > &position, std::ostream *os)
 Create factor dot.
 

Public Attributes

Axis paperHorizontalAxis
 
Axis paperVerticalAxis
 
double scale
 Scale all positions to reduce / increase density.
 
bool mergeSimilarFactors
 
double figureWidthInches
 The figure width on paper in inches.
 
double figureHeightInches
 The figure height on paper in inches.
 
bool plotFactorPoints
 Plots each factor as a dot between the variables.
 
bool connectKeysToFactor
 
bool binaryEdges
 just use non-dotted edges for binary factors
 
std::map< Key, Vector2 > variablePositions
 
std::map< char, double > positionHints
 
std::set< Keyboxes
 
std::map< size_t, Vector2 > factorPositions
 

Detailed Description

Formatting options and functions for saving a NonlinearFactorGraph instance in GraphViz format.

Constructor & Destructor Documentation

◆ GraphvizFormatting()

gtsam::GraphvizFormatting::GraphvizFormatting ( )
inline

Default constructor sets up robot coordinates. Paper horizontal is robot Y, paper vertical is robot X. Default figure size of 5x5 in.

Member Data Documentation

◆ boxes

std::set<Key> gtsam::DotWriter::boxes
inherited

A set of keys that will be displayed as a box

◆ connectKeysToFactor

bool gtsam::DotWriter::connectKeysToFactor
inherited

Draw a line from each key within a factor to the dot of the factor

◆ factorPositions

std::map<size_t, Vector2> gtsam::DotWriter::factorPositions
inherited

Factor positions can be optionally specified and will be included in the dot file with a "!' sign, so "neato" can use it to render them.

◆ mergeSimilarFactors

bool gtsam::GraphvizFormatting::mergeSimilarFactors

Merge multiple factors that have the same connectivity

◆ paperHorizontalAxis

Axis gtsam::GraphvizFormatting::paperHorizontalAxis

The world axis assigned to the horizontal paper axis

◆ paperVerticalAxis

Axis gtsam::GraphvizFormatting::paperVerticalAxis

The world axis assigned to the vertical paper axis

◆ positionHints

std::map<char, double> gtsam::DotWriter::positionHints
inherited

The position hints allow one to use symbol character and index to specify position. Unless variable positions are specified, if a hint is present for a given symbol, it will be used to calculate the positions as (index,hint).

◆ variablePositions

std::map<Key, Vector2> gtsam::DotWriter::variablePositions
inherited

Variable positions can be optionally specified and will be included in the dot file with a "!' sign, so "neato" can use it to render them.


The documentation for this struct was generated from the following file: