|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Node for graphs implemented with simple adjacency lists. More...
#include <tpl_sgraph.H>
Public Types | |
| using | Base = GTNodeCommon< Node_Info > |
Public Types inherited from GTNodeCommon< NodeInfo > | |
| using | Item_Type = NodeInfo |
| using | Node = GTNodeCommon |
| Common alias for set types. | |
| using | Node_Type = NodeInfo |
| The node. | |
Public Member Functions | |
| Graph_Snode (const Node_Info &info) | |
| Constructor that assigns an attribute value. | |
| Graph_Snode (Node_Info &&info=Node_Info()) | |
| Graph_Snode (const Graph_Snode &node) | |
| Graph_Snode & | operator= (const Graph_Snode &node) |
| Graph_Snode (Graph_Snode *node) | |
| Copy constructor from a node pointer. | |
Public Member Functions inherited from GTNodeCommon< NodeInfo > | |
| GTNodeCommon () noexcept=default | |
| another alias for set type | |
| GTNodeCommon (const NodeInfo &info) | |
| Copy constructor from info value. | |
| GTNodeCommon (NodeInfo &&info) | |
| Move constructor from info value. | |
| GTNodeCommon (const GTNodeCommon &other) | |
| Copy constructor. | |
| GTNodeCommon (GTNodeCommon &&other) noexcept | |
| Move constructor. | |
| GTNodeCommon & | operator= (const GTNodeCommon &other) |
| Copy assignment operator. | |
| GTNodeCommon & | operator= (GTNodeCommon &&other) noexcept |
| Move assignment operator. | |
| 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 | |
| DynList< void * > | arc_list |
| Adjacency list of arcs incident to this node. | |
Public Attributes inherited from GTNodeCommon< NodeInfo > | |
| Graph_Attr | attrs |
| Attributes of node. | |
| NodeInfo | node_info |
| size_t | num_arcs = 0 |
| data associated to the node. Access it with get_info() | |
Friends | |
| class | GTNodeCommon< Node_Info > |
Node for graphs implemented with simple adjacency lists.
This class defines a node or vertex of a graph or digraph implemented using singly-linked adjacency lists.
There are basically three ways to define the information that belongs to a graph node:
| Node_Info | Data type stored in the node and accessible via the get_info() method. |
A graph node has three additional attributes present for each node, named as follows:
Definition at line 92 of file tpl_sgraph.H.
| using Aleph::Graph_Snode< Node_Info >::Base = GTNodeCommon<Node_Info> |
Definition at line 94 of file tpl_sgraph.H.
|
inline |
Constructor that assigns an attribute value.
Creates a node and assigns the value info as the information contained in the node.
The control bits and counter values are set to zero. The cookie is set to nullptr.
| [in] | info | The information value to assign to the newly created node. |
Definition at line 112 of file tpl_sgraph.H.
|
inline |
Definition at line 118 of file tpl_sgraph.H.
|
inline |
Definition at line 124 of file tpl_sgraph.H.
|
inline |
Copy constructor from a node pointer.
Creates a node and assigns node->get_info() as the information value contained in the node.
The control bits and counter values are set to zero. The cookie is set to nullptr.
| [in] | node | Pointer to the node from which to copy the information value to assign to the newly created node. |
Definition at line 152 of file tpl_sgraph.H.
|
inline |
Definition at line 130 of file tpl_sgraph.H.
References GTNodeCommon< NodeInfo >::node_info.
|
friend |
Definition at line 1 of file tpl_sgraph.H.
| DynList<void *> Aleph::Graph_Snode< Node_Info >::arc_list |
Adjacency list of arcs incident to this node.
Definition at line 97 of file tpl_sgraph.H.