Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
gtsam::DotWriter Struct Reference

DotWriter is a helper class for writing graphviz .dot files. More...

#include <DotWriter.h>

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

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< Vector2variablePos (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< 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
 

Detailed Description

DotWriter is a helper class for writing graphviz .dot files.

Definition at line 36 of file DotWriter.h.

Constructor & Destructor Documentation

◆ DotWriter()

gtsam::DotWriter::DotWriter ( double  figureWidthInches = 5,
double  figureHeightInches = 5,
bool  plotFactorPoints = true,
bool  connectKeysToFactor = true,
bool  binaryEdges = false 
)
inlineexplicit

Definition at line 66 of file DotWriter.h.

Member Function Documentation

◆ digraphPreamble()

void gtsam::DotWriter::digraphPreamble ( std::ostream *  os) const

Write out preamble for digraph, including size.

Definition at line 36 of file DotWriter.cpp.

◆ DrawFactor()

void gtsam::DotWriter::DrawFactor ( size_t  i,
const std::optional< Vector2 > &  position,
std::ostream *  os 
)
static

Create factor dot.

Definition at line 57 of file DotWriter.cpp.

◆ drawVariable()

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.

◆ graphPreamble()

void gtsam::DotWriter::graphPreamble ( std::ostream *  os) const

Write out preamble for graph, including size.

Definition at line 30 of file DotWriter.cpp.

◆ processFactor()

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.

◆ variablePos()

std::optional< Vector2 > gtsam::DotWriter::variablePos ( Key  key) const

Return variable position or none.

Definition at line 79 of file DotWriter.cpp.

Member Data Documentation

◆ binaryEdges

bool gtsam::DotWriter::binaryEdges

just use non-dotted edges for binary factors

Definition at line 42 of file DotWriter.h.

◆ boxes

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

A set of keys that will be displayed as a box

Definition at line 58 of file DotWriter.h.

◆ connectKeysToFactor

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.

◆ factorPositions

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

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.

◆ figureHeightInches

double gtsam::DotWriter::figureHeightInches

The figure height on paper in inches.

Definition at line 38 of file DotWriter.h.

◆ figureWidthInches

double gtsam::DotWriter::figureWidthInches

The figure width on paper in inches.

Definition at line 37 of file DotWriter.h.

◆ plotFactorPoints

bool gtsam::DotWriter::plotFactorPoints

Plots each factor as a dot between the variables.

Definition at line 39 of file DotWriter.h.

◆ positionHints

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.

◆ variablePositions

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

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.


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


gtsam
Author(s):
autogenerated on Fri Nov 1 2024 03:51:16