|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Common attributes and methods for nodes (vertexes) belonging to graphs. More...
#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=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 | |
| Graph_Attr | attrs |
| Attributes of node. | |
| NodeInfo | node_info |
| size_t | num_arcs = 0 |
| data associated to the node. Access it with get_info() | |
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.
Definition at line 434 of file graph-dry.H.
| using GTNodeCommon< NodeInfo >::Item_Type = NodeInfo |
Definition at line 456 of file graph-dry.H.
| using GTNodeCommon< NodeInfo >::Node = GTNodeCommon |
Common alias for set types.
Definition at line 458 of file graph-dry.H.
| using GTNodeCommon< NodeInfo >::Node_Type = NodeInfo |
The node.
Definition at line 460 of file graph-dry.H.
|
defaultnoexcept |
another alias for set type
Default constructor
|
inline |
Copy constructor from info value.
Definition at line 466 of file graph-dry.H.
|
inline |
Move constructor from info value.
Definition at line 469 of file graph-dry.H.
|
inline |
Copy constructor.
Definition at line 472 of file graph-dry.H.
|
inlinenoexcept |
Move constructor.
Definition at line 475 of file graph-dry.H.
|
inlinenoexcept |
Return a constant reference to the data contained in the node.
Definition at line 497 of file graph-dry.H.
References GTNodeCommon< NodeInfo >::node_info.
|
inlinenoexcept |
Return a modifiable reference to the data contained in the node.
Definition at line 494 of file graph-dry.H.
References GTNodeCommon< NodeInfo >::node_info.
Referenced by Aleph::__dfp_phase2_subgraph(), Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::compute_min_paths_tree(), Aleph::Dijkstra_Min_Paths< GT, Distance, Itor, SA, HeapT >::compute_min_paths_tree(), Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::compute_partial_min_paths_tree(), Aleph::Dijkstra_Min_Paths< GT, Distance, Itor, SA, HeapT >::compute_partial_min_paths_tree(), Aleph::AStar_Min_Path< GT, Distance, Heuristic, Itor, SA, HeapT >::compute_partial_path(), Aleph::Matrix_Graph< GT, SA >::copy(), Aleph::copy_graph(), main(), Aleph::Dft_Node_Attr< GT >::operator()(), Aleph::Init_Prim_Info< GT >::operator()(), NodeInitializer::operator()(), Aleph::Init_P< GT >::operator()(), Aleph::Init_Arc< GT >::operator()(), Aleph::Dft_Load_Node< GT >::operator()(), Aleph::Rnode< GT >::operator()(), Aleph::Dft_Load_Node< GT >::operator()(), Aleph::Dft_Store_Node< GT >::operator()(), Aleph::Wnode< GT >::operator()(), Aleph::Dft_Store_Node< GT >::operator()(), Aleph::Dft_Node_Cmp< GT >::operator()(), Aleph::Dft_Copy_Node< GTT, GTS >::operator()(), print_grid_with_path(), AStarGridTest::SetUp(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST_F(), TEST_F(), and TEST_F().
|
inline |
Copy assignment operator.
Definition at line 478 of file graph-dry.H.
References GTNodeCommon< NodeInfo >::node_info.
|
inlinenoexcept |
Move assignment operator.
Definition at line 486 of file graph-dry.H.
References GTNodeCommon< NodeInfo >::node_info.
|
inlinenoexcept |
Set the state to value s
Definition at line 503 of file graph-dry.H.
References NODE_BITS.
Referenced by Graph_Traverse< GT, Itor, Q, Show_Arc >::exec(), Aleph::Directed_Find_Path< GT, Itor, SA >::find(), Graph_Traverse< GT, Itor, Q, Show_Arc >::operator()(), and Graph_Traverse< GT, Itor, Q, Show_Arc >::operator()().
|
inlinenoexcept |
Return the state's value.
Definition at line 500 of file graph-dry.H.
References NODE_BITS.
Referenced by Graph_Traverse< GT, Itor, Q, Show_Arc >::exec(), Graph_Traverse< GT, Itor, Q, Show_Arc >::operator()(), and Graph_Traverse< GT, Itor, Q, Show_Arc >::operator()().
| Graph_Attr GTNodeCommon< NodeInfo >::attrs |
| NodeInfo GTNodeCommon< NodeInfo >::node_info |
Definition at line 443 of file graph-dry.H.
Referenced by GTNodeCommon< NodeInfo >::get_info(), GTNodeCommon< NodeInfo >::get_info(), Aleph::Graph_Anode< Node_Info >::operator=(), Aleph::Graph_Node< __Node_Info >::operator=(), Aleph::Graph_Snode< Node_Info >::operator=(), GTNodeCommon< NodeInfo >::operator=(), and GTNodeCommon< NodeInfo >::operator=().
| 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).
Definition at line 454 of file graph-dry.H.
Referenced by Aleph::Graph_Anode< Node_Info >::compress(), Aleph::Graph_Anode< Node_Info >::init(), Aleph::Graph_Anode< Node_Info >::insert_arc(), Aleph::Graph_Anode< Node_Info >::remove_arc(), Aleph::Graph_Anode< Node_Info >::remove_arc_ne(), Aleph::search_arc(), Aleph::search_spanning_tree_arc(), TEST(), TEST(), TEST(), TEST(), and TEST().