#include <graph-dry.H>
Public Types | |
| using | Item_Type = NodeInfo |
| using | Node = GTNodeCommon |
| Common alias for set types. | |
| using | Node_Type = NodeInfo |
| The node. | |
Public Member Functions | |
| GTNodeCommon () noexcept | |
| another alias for set type | |
| GTNodeCommon (const NodeInfo &info) | |
| GTNodeCommon (NodeInfo &&info) | |
| NodeInfo & | get_info () noexcept |
| Return a modifiable reference to the data contained in the node. | |
| const NodeInfo & | get_info () const noexcept |
| Return a constant reference to the data contained in the node. | |
| unsigned int | state () const noexcept |
| Return the state's value. | |
| void | set_state (unsigned int s) noexcept |
Set the state to value s | |
Public Attributes | |
| Graph_Attr | attrs |
| NodeInfo | node_info |
| size_t | num_arcs = 0 |
| data associated to the node. Access it with get_info() More... | |
Common attributes and methods for nodes (vertexes) belonging to graphs.
This class defines common attributes and methods for graphs. All graph nodes inherit the data and function members of this class. Although this class exports data members, it is not recommended to directly access them. Instead use the macros NODE_BITS, NODE_COUNTER and NODE_COOKIE, which define access to the three attributes.
| Graph_Attr GTNodeCommon< NodeInfo >::attrs |
Attributes of node
| size_t GTNodeCommon< NodeInfo >::num_arcs = 0 |
data associated to the node. Access it with get_info()
Number of arcs.
If the graph is directed, then this field does not have much sense, since it counts the total of arcs (incoming and outcoming).