|
CBMC
|
This class represents a node in a directed graph. More...
#include <graph.h>
Inheritance diagram for graph_nodet< E >:
Collaboration diagram for graph_nodet< E >:Public Types | |
| typedef std::size_t | node_indext |
| typedef E | edget |
| typedef std::map< node_indext, edget > | edgest |
Public Member Functions | |
| void | add_in (node_indext n) |
| void | add_out (node_indext n) |
| void | erase_in (node_indext n) |
| void | erase_out (node_indext n) |
| std::string | pretty (const node_indext &idx) const |
| virtual | ~graph_nodet () |
Public Attributes | |
| edgest | in |
| edgest | out |
Private Member Functions | |
| virtual std::string | dot_attributes (const node_indext &) const |
| Node with attributes suitable for Graphviz DOT format. More... | |
This class represents a node in a directed graph.
See grapht for more information.
| typedef std::map<node_indext, edget> graph_nodet< E >::edgest |
| typedef E graph_nodet< E >::edget |
| typedef std::size_t graph_nodet< E >::node_indext |
|
inlinevirtual |
|
inline |
|
inline |
|
inlineprivatevirtual |
Node with attributes suitable for Graphviz DOT format.
Derived types may override this function to produce more informative DOT diagrams than the default implementation, which displays only the node index. The return value should be a list of node attributes within square brackets that can be parsed by dot. Here is a sample implementation for a fictional node type with is_evil() and is_pink() functions:
std::stringstream ss; ss << "[shape=\"" << is_evil() ? "box" : "diamond" << "\", color=\"" << is_pink() ? "#e91e63" : "#9c27b0" << "\", label=\"this is node " << std::to_string(idx) << "\"]"; return ss.str();
|
inline |
|
inline |
|
inline |
| edgest graph_nodet< E >::in |
| edgest graph_nodet< E >::out |