DotWriter is a helper class for writing graphviz .dot files. More...
#include <DotWriter.h>
Public Member Functions | |
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< Vector2 > | variablePos (Key key) const |
Return variable position or none. More... | |
Static Public Member Functions | |
static void | DrawFactor (size_t i, const std::optional< Vector2 > &position, std::ostream *os) |
Create factor dot. More... | |
Public Attributes | |
bool | binaryEdges |
just use non-dotted edges for binary factors More... | |
std::set< Key > | boxes |
bool | connectKeysToFactor |
std::map< size_t, Vector2 > | factorPositions |
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, Vector2 > | variablePositions |
DotWriter is a helper class for writing graphviz .dot files.
Definition at line 36 of file DotWriter.h.
|
inlineexplicit |
Definition at line 66 of file DotWriter.h.
void gtsam::DotWriter::digraphPreamble | ( | std::ostream * | os | ) | const |
Write out preamble for digraph, including size.
Definition at line 36 of file DotWriter.cpp.
|
static |
Create factor dot.
Definition at line 57 of file DotWriter.cpp.
void gtsam::DotWriter::drawVariable | ( | Key | key, |
const KeyFormatter & | keyFormatter, | ||
const std::optional< Vector2 > & | position, | ||
std::ostream * | os | ||
) | const |
Create a variable dot fragment.
Definition at line 42 of file DotWriter.cpp.
void gtsam::DotWriter::graphPreamble | ( | std::ostream * | os | ) | const |
Write out preamble for graph, including size.
Definition at line 30 of file DotWriter.cpp.
void gtsam::DotWriter::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.
Definition at line 98 of file DotWriter.cpp.
Return variable position or none.
Definition at line 79 of file DotWriter.cpp.
bool gtsam::DotWriter::binaryEdges |
just use non-dotted edges for binary factors
Definition at line 42 of file DotWriter.h.
A set of keys that will be displayed as a box
Definition at line 58 of file DotWriter.h.
bool gtsam::DotWriter::connectKeysToFactor |
Draw a line from each key within a factor to the dot of the factor
Definition at line 40 of file DotWriter.h.
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.
Definition at line 64 of file DotWriter.h.
double gtsam::DotWriter::figureHeightInches |
The figure height on paper in inches.
Definition at line 38 of file DotWriter.h.
double gtsam::DotWriter::figureWidthInches |
The figure width on paper in inches.
Definition at line 37 of file DotWriter.h.
bool gtsam::DotWriter::plotFactorPoints |
Plots each factor as a dot between the variables.
Definition at line 39 of file DotWriter.h.
std::map<char, double> gtsam::DotWriter::positionHints |
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).
Definition at line 55 of file DotWriter.h.
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.
Definition at line 48 of file DotWriter.h.