66 explicit DotWriter(
double figureWidthInches = 5,
67 double figureHeightInches = 5,
68 bool plotFactorPoints =
true,
69 bool connectKeysToFactor =
true,
bool binaryEdges =
false)
70 : figureWidthInches(figureWidthInches),
71 figureHeightInches(figureHeightInches),
72 plotFactorPoints(plotFactorPoints),
73 connectKeysToFactor(connectKeysToFactor),
74 binaryEdges(binaryEdges) {}
77 void graphPreamble(std::ostream* os)
const;
80 void digraphPreamble(std::ostream* os)
const;
84 const std::optional<Vector2>& position,
85 std::ostream* os)
const;
88 static void DrawFactor(
size_t i,
const std::optional<Vector2>& position,
92 std::optional<Vector2> variablePos(
Key key)
const;
95 void processFactor(
size_t i,
const KeyVector& keys,
97 const std::optional<Vector2>& position,
98 std::ostream* os)
const;
double figureHeightInches
The figure height on paper in inches.
Definition: DotWriter.h:38
std::set< Key > boxes
Definition: DotWriter.h:58
std::map< Key, Vector2 > variablePositions
Definition: DotWriter.h:48
std::map< size_t, Vector2 > factorPositions
Definition: DotWriter.h:64
std::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
Definition: Key.h:35
DotWriter is a helper class for writing graphviz .dot files.
Definition: DotWriter.h:36
A thin wrapper around std::vector that uses a custom allocator.
Definition: chartTesting.h:28
typedef and functions to augment Eigen's VectorXd
FastVector< Key > KeyVector
Define collection type once and for all - also used in wrappers.
Definition: Key.h:86
double figureWidthInches
The figure width on paper in inches.
Definition: DotWriter.h:37
bool connectKeysToFactor
Definition: DotWriter.h:40
bool plotFactorPoints
Plots each factor as a dot between the variables.
Definition: DotWriter.h:39
std::uint64_t Key
Integer nonlinear key type.
Definition: types.h:102
std::map< char, double > positionHints
Definition: DotWriter.h:55