![]() |
aGrUM 3.3.2
a C++ library for (probabilistic) graphical models
|
The options given to a toDot(const DotOptions&). More...
#include <agrum/base/core/dot/dotOptions.h>
Public Member Functions | |
| bool | empty () const |
| true if nothing was given | |
Graph | |
size of the graph, in inches (5, or 12! for an exact size) | |
| void | setSize (const std::string &size) |
| direction of the layout, TB or LR | |
| void | setRankDir (const std::string &rankDir) |
| direction of the layout, TB or LR | |
| void | setLayout (const std::string &layout) |
| graphviz layout engine | |
| void | setLabel (const std::string &label) |
| label of the graph (by default, the name of the graph if it has one) | |
| const std::string & | size () const |
| direction of the layout, TB or LR | |
| const std::string & | rankDir () const |
| direction of the layout, TB or LR | |
| const std::string & | layout () const |
| direction of the layout, TB or LR | |
| const std::string & | label () const |
| direction of the layout, TB or LR | |
Nodes | |
| void | setNodeBgColor (Size node, const std::string &color) |
| any other attribute of the node ; written as is if verbatim, see DotAttribute | |
| void | setNodeFgColor (Size node, const std::string &color) |
| any other attribute of the node ; 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 | |
| void | setNodeTooltip (Size node, const std::string &tooltip) |
| any other attribute of the node ; written as is if verbatim, see DotAttribute | |
| 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 | |
| const DotNodeOptions * | node (Size node) const |
| the options of a node, or nullptr if none was given for it | |
Arcs and edges | |
| void | setArcColor (Size tail, Size head, const std::string &color) |
| void | setArcWidth (Size tail, Size head, double width) |
| void | setArcLabel (Size tail, Size head, const std::string &label) |
| void | setArcTooltip (Size tail, Size head, const std::string &tooltip) |
| 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 | |
| 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 | |
| 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), or nullptr | |
Factors of a factor graph | |
A factor is designated by the identifiers of its variables, in any order. | |
| 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 | 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 | |
| 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 | 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 | |
| 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 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 | |
Static Private Member Functions | |
| static std::vector< Size > | _key_ (std::vector< Size > variables) |
Private Attributes | |
| std::string | _size_ |
| std::string | _rankDir_ |
| std::string | _layout_ |
| std::string | _label_ |
| std::map< Size, DotNodeOptions > | _nodes_ |
| std::map< std::pair< Size, Size >, DotArcOptions > | _arcs_ |
| std::map< std::vector< Size >, DotNodeOptions > | _factors_ |
The options given to a toDot(const DotOptions&).
What is not given is taken from the configuration (see gum::dot::DotStyle). The nodes are designated by their identifier (NodeId), the arcs by the identifiers of their tail and their head; an undirected edge is designated by its two ends, given in any order. The options are filled with setters, one value at a time, so that they can be filled from any language (colors computed from a color map for instance).
Errors : gum::InvalidArgument for a width that is negative or not a finite number.
Definition at line 110 of file dotOptions.h.
Definition at line 137 of file dotOptions.cpp.
Referenced by factor(), setFactorAttribute(), setFactorBgColor(), setFactorFgColor(), setFactorLabel(), and setFactorTooltip().
| const DotArcOptions * gum::dot::DotOptions::arc | ( | Size | tail, |
| Size | head ) const |
the options of the arc from tail to head, or nullptr if none was given for it
Definition at line 127 of file dotOptions.cpp.
References _arcs_.
Referenced by gum::KTBN< GUM_SCALAR >::_timeSlicesToDot_(), gum::CausalModel< GUM_SCALAR >::_toDot_(), edge(), gum::BayesNetFragment< GUM_SCALAR >::toDot(), gum::credal::CredalNet< GUM_SCALAR >::toDot(), gum::DiGraph::toDot(), gum::EssentialGraph::toDot(), gum::InfluenceDiagram< GUM_SCALAR >::toDot(), gum::MarkovBlanket::toDot(), gum::MixedGraph::toDot(), and gum::PDAG::toDot().
| const DotArcOptions * gum::dot::DotOptions::edge | ( | Size | a, |
| Size | b ) const |
the options of the undirected edge between a and b, given for (a, b) or for (b, a), or nullptr
Definition at line 132 of file dotOptions.cpp.
References arc().
Referenced by gum::EssentialGraph::toDot(), gum::IMarkovRandomField< GUM_SCALAR >::toDot(), gum::MixedGraph::toDot(), gum::PAG::toDot(), gum::PDAG::toDot(), and gum::UndiGraph::toDot().
| bool gum::dot::DotOptions::empty | ( | ) | const |
true if nothing was given
Definition at line 174 of file dotOptions.cpp.
References _arcs_, _factors_, _label_, _layout_, _nodes_, _rankDir_, and _size_.
| const DotNodeOptions * gum::dot::DotOptions::factor | ( | const std::vector< Size > & | variables | ) | const |
the options of the factor on these variables (in any order), or nullptr if none was given
Definition at line 169 of file dotOptions.cpp.
References _factors_, and _key_().
Referenced by gum::IMarkovRandomField< GUM_SCALAR >::toDotAsFactorGraph().
| const std::string & gum::dot::DotOptions::label | ( | ) | const |
direction of the layout, TB or LR
Definition at line 69 of file dotOptions.cpp.
References _label_.
Referenced by setArcLabel(), setFactorLabel(), setLabel(), setNodeLabel(), and gum::dot::writePreamble().
| const std::string & gum::dot::DotOptions::layout | ( | ) | const |
direction of the layout, TB or LR
Definition at line 67 of file dotOptions.cpp.
References _layout_.
Referenced by setLayout(), and gum::dot::writePreamble().
| const DotNodeOptions * gum::dot::DotOptions::node | ( | Size | node | ) | const |
the options of a node, or nullptr if none was given for it
Definition at line 94 of file dotOptions.cpp.
References _nodes_, and node().
Referenced by gum::KTBN< GUM_SCALAR >::_timeSlicesToDot_(), gum::CausalModel< GUM_SCALAR >::_toDot_(), node(), setNodeAttribute(), setNodeBgColor(), setNodeFgColor(), setNodeLabel(), setNodeTooltip(), gum::BayesNetFragment< GUM_SCALAR >::toDot(), gum::credal::CredalNet< GUM_SCALAR >::toDot(), gum::EssentialGraph::toDot(), gum::IMarkovRandomField< GUM_SCALAR >::toDot(), gum::InfluenceDiagram< GUM_SCALAR >::toDot(), gum::MarkovBlanket::toDot(), gum::IMarkovRandomField< GUM_SCALAR >::toDotAsFactorGraph(), and gum::NodeGraphPart::writeDotNode().
| const std::string & gum::dot::DotOptions::rankDir | ( | ) | const |
direction of the layout, TB or LR
Definition at line 65 of file dotOptions.cpp.
References _rankDir_.
Referenced by setRankDir(), and gum::dot::writePreamble().
| void gum::dot::DotOptions::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
Definition at line 119 of file dotOptions.cpp.
References _arcs_.
| width | the width of the line, at least 0 |
Definition at line 99 of file dotOptions.cpp.
References _arcs_.
| width | the width of the line, at least 0 |
Definition at line 111 of file dotOptions.cpp.
References _arcs_, and label().
| width | the width of the line, at least 0 |
Definition at line 115 of file dotOptions.cpp.
References _arcs_.
| width | the width of the line, at least 0 |
Definition at line 103 of file dotOptions.cpp.
| void gum::dot::DotOptions::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
Definition at line 162 of file dotOptions.cpp.
References _factors_, and _key_().
| void gum::dot::DotOptions::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
Definition at line 143 of file dotOptions.cpp.
References _factors_, and _key_().
| void gum::dot::DotOptions::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
Definition at line 148 of file dotOptions.cpp.
References _factors_, and _key_().
| void gum::dot::DotOptions::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
Definition at line 153 of file dotOptions.cpp.
References _factors_, _key_(), and label().
| void gum::dot::DotOptions::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
Definition at line 157 of file dotOptions.cpp.
References _factors_, and _key_().
| void gum::dot::DotOptions::setLabel | ( | const std::string & | label | ) |
| void gum::dot::DotOptions::setLayout | ( | const std::string & | layout | ) |
graphviz layout engine
Definition at line 59 of file dotOptions.cpp.
References _layout_, and layout().
| void gum::dot::DotOptions::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
Definition at line 87 of file dotOptions.cpp.
References _nodes_, and node().
| void gum::dot::DotOptions::setNodeBgColor | ( | Size | node, |
| const std::string & | color ) |
any other attribute of the node ; written as is if verbatim, see DotAttribute
Definition at line 71 of file dotOptions.cpp.
References _nodes_, and node().
| void gum::dot::DotOptions::setNodeFgColor | ( | Size | node, |
| const std::string & | color ) |
any other attribute of the node ; written as is if verbatim, see DotAttribute
Definition at line 75 of file dotOptions.cpp.
References _nodes_, and node().
| void gum::dot::DotOptions::setNodeLabel | ( | Size | node, |
| const std::string & | label ) |
any other attribute of the node ; written as is if verbatim, see DotAttribute
Definition at line 79 of file dotOptions.cpp.
References _nodes_, label(), and node().
| void gum::dot::DotOptions::setNodeTooltip | ( | Size | node, |
| const std::string & | tooltip ) |
any other attribute of the node ; written as is if verbatim, see DotAttribute
Definition at line 83 of file dotOptions.cpp.
References _nodes_, and node().
| void gum::dot::DotOptions::setRankDir | ( | const std::string & | rankDir | ) |
direction of the layout, TB or LR
Definition at line 57 of file dotOptions.cpp.
References _rankDir_, and rankDir().
| void gum::dot::DotOptions::setSize | ( | const std::string & | size | ) |
direction of the layout, TB or LR
Definition at line 55 of file dotOptions.cpp.
References _size_, and size().
| const std::string & gum::dot::DotOptions::size | ( | ) | const |
direction of the layout, TB or LR
Definition at line 63 of file dotOptions.cpp.
References _size_.
Referenced by gum::KTBN< GUM_SCALAR >::_timeSlicesToDot_(), setSize(), and gum::dot::writePreamble().
|
private |
Definition at line 195 of file dotOptions.h.
Referenced by arc(), empty(), setArcAttribute(), setArcColor(), setArcLabel(), setArcTooltip(), and setArcWidth().
|
private |
Definition at line 196 of file dotOptions.h.
Referenced by empty(), factor(), setFactorAttribute(), setFactorBgColor(), setFactorFgColor(), setFactorLabel(), and setFactorTooltip().
|
private |
Definition at line 192 of file dotOptions.h.
Referenced by empty(), label(), and setLabel().
|
private |
Definition at line 191 of file dotOptions.h.
Referenced by empty(), layout(), and setLayout().
|
private |
Definition at line 194 of file dotOptions.h.
Referenced by empty(), node(), setNodeAttribute(), setNodeBgColor(), setNodeFgColor(), setNodeLabel(), and setNodeTooltip().
|
private |
Definition at line 190 of file dotOptions.h.
Referenced by empty(), rankDir(), and setRankDir().
|
private |
Definition at line 189 of file dotOptions.h.