48#ifndef GUM_DOT_OPTIONS_H
49#define GUM_DOT_OPTIONS_H
123 const std::string&
size()
const;
124 const std::string&
rankDir()
const;
125 const std::string&
layout()
const;
126 const std::string&
label()
const;
137 const std::string& key,
138 const std::string& value,
139 bool verbatim =
false);
155 const std::string& key,
156 const std::string& value,
157 bool verbatim =
false);
169 void setFactorBgColor(
const std::vector< Size >& variables,
const std::string& color);
170 void setFactorFgColor(
const std::vector< Size >& variables,
const std::string& color);
172 void setFactorTooltip(
const std::vector< Size >& variables,
const std::string& tooltip);
176 const std::string& key,
177 const std::string& value,
178 bool verbatim =
false);
199 static std::vector< Size >
_key_(std::vector< Size > variables);
The options given to a toDot(const DotOptions&).
void setArcColor(Size tail, Size head, const std::string &color)
std::map< std::pair< Size, Size >, DotArcOptions > _arcs_
void setRankDir(const std::string &rankDir)
direction of the layout, TB or LR
void setNodeAttribute(Size node, const std::string &key, const std::string &value, bool verbatim=false)
any other attribute of the node ; written as is if verbatim, see DotAttribute
void setFactorTooltip(const std::vector< Size > &variables, const std::string &tooltip)
any other attribute of the node of the factor ; written as is if verbatim, see DotAttribute
const std::string & layout() const
direction of the layout, TB or LR
void setArcWidth(Size tail, Size head, double width)
void setArcAttribute(Size tail, Size head, const std::string &key, const std::string &value, bool verbatim=false)
any other attribute of the arc ; written as is if verbatim, see DotAttribute
void setNodeBgColor(Size node, const std::string &color)
any other attribute of the node ; written as is if verbatim, see DotAttribute
void setFactorAttribute(const std::vector< Size > &variables, const std::string &key, const std::string &value, bool verbatim=false)
any other attribute of the node of the factor ; written as is if verbatim, see DotAttribute
const std::string & label() const
direction of the layout, TB or LR
const std::string & size() const
direction of the layout, TB or LR
const DotArcOptions * arc(Size tail, Size head) const
the options of the arc from tail to head, or nullptr if none was given for it
std::map< std::vector< Size >, DotNodeOptions > _factors_
void setArcTooltip(Size tail, Size head, const std::string &tooltip)
void setLabel(const std::string &label)
label of the graph (by default, the name of the graph if it has one)
std::map< Size, DotNodeOptions > _nodes_
void setNodeTooltip(Size node, const std::string &tooltip)
any other attribute of the node ; written as is if verbatim, see DotAttribute
void setSize(const std::string &size)
direction of the layout, TB or LR
void setFactorFgColor(const std::vector< Size > &variables, const std::string &color)
any other attribute of the node of the factor ; written as is if verbatim, see DotAttribute
bool empty() const
true if nothing was given
const DotArcOptions * edge(Size a, Size b) const
the options of the undirected edge between a and b, given for (a, b) or for (b, a),...
static std::vector< Size > _key_(std::vector< Size > variables)
void setLayout(const std::string &layout)
graphviz layout engine
void setNodeFgColor(Size node, const std::string &color)
any other attribute of the node ; written as is if verbatim, see DotAttribute
const std::string & rankDir() const
direction of the layout, TB or LR
const DotNodeOptions * factor(const std::vector< Size > &variables) const
the options of the factor on these variables (in any order), or nullptr if none was given
const DotNodeOptions * node(Size node) const
the options of a node, or nullptr if none was given for it
void setFactorBgColor(const std::vector< Size > &variables, const std::string &color)
any other attribute of the node of the factor ; written as is if verbatim, see DotAttribute
void setArcLabel(Size tail, Size head, const std::string &label)
void setFactorLabel(const std::vector< Size > &variables, const std::string &label)
any other attribute of the node of the factor ; written as is if verbatim, see DotAttribute
void setNodeLabel(Size node, const std::string &label)
any other attribute of the node ; written as is if verbatim, see DotAttribute
A minimal writer of graphs in the dot language of graphviz.
std::size_t Size
In aGrUM, hashed values are unsigned long int.
std::vector< DotAttribute > DotAttributes
a list of attributes
the options of an arc or an edge : an empty text (no value for the width) means "not given"
std::optional< double > width
DotAttributes attributes
other attributes, written after the ones above
the options of a node : an empty text means "not given", so that the value of the configuration is us...
std::string fgColor
font color (if only the background is given, the font color is adaptive against it)
std::string tooltip
text displayed when the mouse is over the node
std::string bgColor
background color
DotAttributes attributes
other attributes, written after the ones above
std::string label
text displayed in the node