|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Node of Array_Graph
More...
#include <tpl_agraph.H>
Public Member Functions | |
| Graph_Anode () | |
| Graph_Anode (const Node_Info &info) | |
| Graph_Anode (Node_Info &&info) | |
| Graph_Anode (const Graph_Anode &node) | |
| Graph_Anode & | operator= (const Graph_Anode &node) |
| Graph_Anode (Graph_Anode *p) | |
| virtual | ~Graph_Anode () |
| void | allocate_more (size_t new_size) |
| void * | insert_arc (void *arc) |
| void | remove_arc_ne (const void *arc) noexcept |
| void | remove_arc (const void *arc) |
| bool | compress () noexcept |
Public Member Functions inherited from Aleph::Dlink | |
| template<typename T > | |
| Dnode< T > * | to_dnode () noexcept |
| template<typename T > | |
| const Dnode< T > * | to_dnode () const noexcept |
| template<typename T > | |
| T & | to_data () noexcept |
| template<typename T > | |
| const T & | to_data () const noexcept |
| Dlink () noexcept | |
| Initialize a node or an empty list. | |
| Dlink (const Dlink &l) noexcept | |
| Copy constructor. | |
| void | swap (Dlink *link) noexcept |
Swap this with list whose header is link. | |
| void | swap (Dlink &l) noexcept |
Swap this with list whose header is l. | |
| Dlink (Dlink &&l) noexcept | |
| Construct a new list with the items of l moved. | |
| Dlink & | operator= (const Dlink &l) noexcept |
| Copy assignation. | |
| Dlink & | operator= (Dlink &&l) noexcept |
| Move assignation. | |
| void | reset () noexcept |
Reset this | |
| void | init () noexcept |
| constexpr bool | is_empty () const noexcept |
Return true if this (as header node) is empty. | |
| constexpr bool | is_unitarian () const noexcept |
Return true if this (as header node) has exactly one element. | |
| constexpr bool | is_unitarian_or_empty () const noexcept |
Return true if this (as header node) has zero or one element. | |
| void | insert (Dlink *node) noexcept |
Insert node after this. | |
| void | push (Dlink *node) noexcept |
| void | append (Dlink *node) noexcept |
Insert node before this. | |
| Dlink *& | get_next () const noexcept |
Return the link that is after this | |
| Dlink *& | get_prev () const noexcept |
Return the link that is before this | |
| constexpr Dlink *& | get_first_ne () const noexcept |
If this is a header node, it return the first node of this | |
| constexpr Dlink *& | get_last_ne () const noexcept |
If this is a header node, it return the last node of this | |
| constexpr Dlink *& | get_first () const noexcept |
If this is a header node, it return the first node of this | |
| constexpr Dlink *& | get_last () const noexcept |
If this is a header node, it return the last node of this | |
| void | wrap_header (Dlink *l) noexcept |
| Wrap a header to a list (without header). | |
| void | insert_list (Dlink *head) noexcept |
Insert the list head before this | |
| void | append_list (Dlink *head) noexcept |
Insert the list head after this | |
| void | splice (Dlink *l) noexcept |
Insert a list l without header node after the node this. | |
| void | concat_list (Dlink *head) noexcept |
Concatenate list head to list this | |
| void | concat_list (Dlink &head) noexcept |
| Dlink * | del () noexcept |
Remove this from the list. this must not be a header node. | |
| void | erase () noexcept |
| Dlink * | remove_prev () noexcept |
Remove the item that is before this | |
| Dlink * | remove_next () noexcept |
Remove the item that is after this | |
| Dlink * | remove_last_ne () noexcept |
| Dlink * | remove_first_ne () noexcept |
| Dlink * | remove_last () noexcept |
| Dlink * | remove_first () noexcept |
| Dlink * | top () const |
| Dlink * | pop () |
| size_t | reverse_list () noexcept |
| Reverse the list. | |
| size_t | reverse () noexcept |
| size_t | split_list_ne (Dlink &l, Dlink &r) noexcept |
Split this in the middle in two lists. | |
| size_t | split_list (Dlink &l, Dlink &r) noexcept |
| Dlink | cut_list (Dlink *link) noexcept |
Cut this from link. | |
| void | remove_all_and_delete () noexcept |
| Remove and free memory for all the items of list. | |
| void | rotate_left (size_t n) |
| Rotate to left the list n positions. | |
| void | rotate_right (size_t n) |
| Analogous to rotate_left() but to right. | |
| bool | check () |
Return true if the list is consistent. | |
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 | |
| void ** | arc_array = nullptr |
| size_t | arcs_dim = 0 |
| size_t | contract_threshold = 0 |
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() | |
Private Types | |
| using | Base = GTNodeCommon< Node_Info > |
Private Member Functions | |
| void | init (const size_t dim) |
Static Private Attributes | |
| static constexpr size_t | Contract_Factor = 4 |
| static constexpr size_t | Default_Cap = 4 |
Friends | |
| class | GTNodeCommon< Node_Info > |
Additional Inherited Members | |
Public Types inherited from GTNodeCommon< NodeInfo > | |
| using | Item_Type = NodeInfo |
| using | Node = GTNodeCommon |
| Common alias for set types. | |
| using | Node_Type = NodeInfo |
| The node. | |
Protected Attributes inherited from Aleph::Dlink | |
| Dlink * | prev |
| Dlink * | next |
Node of Array_Graph
Definition at line 61 of file tpl_agraph.H.
|
private |
Definition at line 65 of file tpl_agraph.H.
|
inline |
Definition at line 89 of file tpl_agraph.H.
References Aleph::Dlink::init().
|
inline |
Definition at line 94 of file tpl_agraph.H.
References Aleph::Graph_Anode< Node_Info >::Default_Cap, and Aleph::Dlink::init().
|
inline |
Definition at line 99 of file tpl_agraph.H.
References Aleph::Graph_Anode< Node_Info >::Default_Cap, and Aleph::Dlink::init().
|
inline |
Definition at line 104 of file tpl_agraph.H.
References Aleph::Dlink::init().
|
inline |
Definition at line 117 of file tpl_agraph.H.
References Aleph::Dlink::init().
|
inlinevirtual |
Definition at line 122 of file tpl_agraph.H.
References Aleph::Graph_Anode< Node_Info >::arc_array, and Aleph::maps().
|
inline |
Definition at line 128 of file tpl_agraph.H.
References ah_bad_alloc_if, Aleph::Graph_Anode< Node_Info >::arc_array, Aleph::Graph_Anode< Node_Info >::arcs_dim, Aleph::Graph_Anode< Node_Info >::Contract_Factor, Aleph::Graph_Anode< Node_Info >::contract_threshold, and Aleph::maps().
Referenced by Aleph::Graph_Anode< Node_Info >::insert_arc().
|
inlinenoexcept |
Definition at line 206 of file tpl_agraph.H.
References Aleph::Graph_Anode< Node_Info >::arc_array, Aleph::Graph_Anode< Node_Info >::arcs_dim, Aleph::Graph_Anode< Node_Info >::Contract_Factor, Aleph::maps(), and GTNodeCommon< NodeInfo >::num_arcs.
|
inlineprivate |
Definition at line 71 of file tpl_agraph.H.
References ah_bad_alloc_if, Aleph::Graph_Anode< Node_Info >::arc_array, Aleph::Graph_Anode< Node_Info >::arcs_dim, Aleph::Graph_Anode< Node_Info >::Contract_Factor, Aleph::Graph_Anode< Node_Info >::contract_threshold, dim(), Aleph::maps(), and GTNodeCommon< NodeInfo >::num_arcs.
|
inline |
Definition at line 141 of file tpl_agraph.H.
References ah_bad_alloc_if, Aleph::Graph_Anode< Node_Info >::allocate_more(), Aleph::Graph_Anode< Node_Info >::arc_array, Aleph::Graph_Anode< Node_Info >::arcs_dim, Aleph::Graph_Anode< Node_Info >::Contract_Factor, Aleph::Graph_Anode< Node_Info >::contract_threshold, Aleph::Graph_Anode< Node_Info >::Default_Cap, Aleph::maps(), and GTNodeCommon< NodeInfo >::num_arcs.
|
inline |
Definition at line 109 of file tpl_agraph.H.
References GTNodeCommon< NodeInfo >::node_info.
|
inline |
Definition at line 183 of file tpl_agraph.H.
References ah_domain_error_if, Aleph::Graph_Anode< Node_Info >::arc_array, Aleph::Graph_Anode< Node_Info >::arcs_dim, Aleph::Graph_Anode< Node_Info >::Contract_Factor, Aleph::Graph_Anode< Node_Info >::contract_threshold, Aleph::maps(), and GTNodeCommon< NodeInfo >::num_arcs.
|
inlinenoexcept |
Definition at line 164 of file tpl_agraph.H.
References Aleph::Graph_Anode< Node_Info >::arc_array, Aleph::Graph_Anode< Node_Info >::arcs_dim, Aleph::Graph_Anode< Node_Info >::Contract_Factor, Aleph::Graph_Anode< Node_Info >::contract_threshold, Aleph::maps(), and GTNodeCommon< NodeInfo >::num_arcs.
|
friend |
Definition at line 1 of file tpl_agraph.H.
| void** Aleph::Graph_Anode< Node_Info >::arc_array = nullptr |
Definition at line 85 of file tpl_agraph.H.
Referenced by Aleph::Graph_Anode< Node_Info >::~Graph_Anode(), Aleph::Graph_Anode< Node_Info >::allocate_more(), 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(), and TEST().
| size_t Aleph::Graph_Anode< Node_Info >::arcs_dim = 0 |
Definition at line 86 of file tpl_agraph.H.
Referenced by Aleph::Graph_Anode< Node_Info >::allocate_more(), 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(), TEST(), and TEST().
|
staticconstexprprivate |
Definition at line 68 of file tpl_agraph.H.
Referenced by Aleph::Graph_Anode< Node_Info >::allocate_more(), 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(), and Aleph::Graph_Anode< Node_Info >::remove_arc_ne().
| size_t Aleph::Graph_Anode< Node_Info >::contract_threshold = 0 |
|
staticconstexprprivate |
Definition at line 69 of file tpl_agraph.H.
Referenced by Aleph::Graph_Anode< Node_Info >::Graph_Anode(), Aleph::Graph_Anode< Node_Info >::Graph_Anode(), and Aleph::Graph_Anode< Node_Info >::insert_arc().