Public Types | Public Member Functions | Public Attributes | List of all members
gtsam::GraphvizFormatting Struct Reference

#include <GraphvizFormatting.h>

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

Public Types

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

Public Member Functions

std::optional< Vector2extractPosition (const Value &value) const
 Extract a Vector2 from either Vector2, Pose2, Pose3, or Point3. More...
 
std::optional< Vector2factorPos (const Vector2 &min, size_t i) const
 Return affinely transformed factor position if it exists. More...
 
Vector2 findBounds (const Values &values, const KeySet &keys) const
 
 GraphvizFormatting ()
 
std::optional< Vector2variablePos (const Values &values, const Vector2 &min, Key key) const
 Return affinely transformed variable position if it exists. More...
 
- Public Member Functions inherited from gtsam::DotWriter
void digraphPreamble (std::ostream *os) const
 Write out preamble for digraph, including size. More...
 
 DotWriter (double figureWidthInches=5, double figureHeightInches=5, bool plotFactorPoints=true, bool connectKeysToFactor=true, bool binaryEdges=false)
 
void drawVariable (Key key, const KeyFormatter &keyFormatter, const std::optional< Vector2 > &position, std::ostream *os) const
 Create a variable dot fragment. More...
 
void graphPreamble (std::ostream *os) const
 Write out preamble for graph, including size. More...
 
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. More...
 
std::optional< Vector2variablePos (Key key) const
 Return variable position or none. More...
 

Public Attributes

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

Additional Inherited Members

- Static Public Member Functions inherited from gtsam::DotWriter
static void DrawFactor (size_t i, const std::optional< Vector2 > &position, std::ostream *os)
 Create factor dot. More...
 

Detailed Description

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

Definition at line 32 of file GraphvizFormatting.h.

Member Enumeration Documentation

◆ Axis

World axes to be assigned to paper axes.

Enumerator
NEGX 
NEGY 
NEGZ 

Definition at line 34 of file GraphvizFormatting.h.

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.

Definition at line 46 of file GraphvizFormatting.h.

Member Function Documentation

◆ extractPosition()

std::optional< Vector2 > gtsam::GraphvizFormatting::extractPosition ( const Value value) const

Extract a Vector2 from either Vector2, Pose2, Pose3, or Point3.

Definition at line 47 of file GraphvizFormatting.cpp.

◆ factorPos()

std::optional< Vector2 > gtsam::GraphvizFormatting::factorPos ( const Vector2 min,
size_t  i 
) const

Return affinely transformed factor position if it exists.

Definition at line 136 of file GraphvizFormatting.cpp.

◆ findBounds()

Vector2 gtsam::GraphvizFormatting::findBounds ( const Values values,
const KeySet keys 
) const

Definition at line 30 of file GraphvizFormatting.cpp.

◆ variablePos()

std::optional< Vector2 > gtsam::GraphvizFormatting::variablePos ( const Values values,
const Vector2 min,
Key  key 
) const

Return affinely transformed variable position if it exists.

Definition at line 124 of file GraphvizFormatting.cpp.

Member Data Documentation

◆ mergeSimilarFactors

bool gtsam::GraphvizFormatting::mergeSimilarFactors

Merge multiple factors that have the same connectivity

Definition at line 41 of file GraphvizFormatting.h.

◆ paperHorizontalAxis

Axis gtsam::GraphvizFormatting::paperHorizontalAxis

The world axis assigned to the horizontal paper axis

Definition at line 36 of file GraphvizFormatting.h.

◆ paperVerticalAxis

Axis gtsam::GraphvizFormatting::paperVerticalAxis

The world axis assigned to the vertical paper axis

Definition at line 38 of file GraphvizFormatting.h.

◆ scale

double gtsam::GraphvizFormatting::scale

Scale all positions to reduce / increase density.

Definition at line 40 of file GraphvizFormatting.h.


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


gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:46:20