|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Arc of graph implemented with double-linked adjacency lists. More...
#include <tpl_graph.H>
Public Types | |
| using | Base = GTArcCommon< _Arc_Info > |
| using | Arc_Info = _Arc_Info |
Public Types inherited from GTArcCommon< ArcInfo > | |
| using | Item_Type = ArcInfo |
| using | Arc_Type = ArcInfo |
Public Member Functions | |
| Graph_Arc (const Arc_Info &info) noexcept | |
| Copy constructor. | |
| Graph_Arc (Arc_Info &&info=Arc_Info()) noexcept | |
| Move or rvalue constructor. | |
| Graph_Arc (const Graph_Arc &arc) | |
| Graph_Arc & | operator= (const Graph_Arc &arc) |
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 GTArcCommon< ArcInfo > | |
| GTArcCommon () noexcept=default | |
| data contained in arc | |
| GTArcCommon (const ArcInfo &info) | |
| Construct from info value (copy) | |
| GTArcCommon (ArcInfo &&info) | |
| Construct from info value (move) | |
| GTArcCommon (void *src, void *tgt, const ArcInfo &data) | |
| Construct with endpoints and info (copy) | |
| GTArcCommon (void *src, void *tgt, ArcInfo &&data=ArcInfo()) | |
| Construct with endpoints and info (move) | |
| GTArcCommon (const GTArcCommon &other) | |
| Copy constructor. | |
| GTArcCommon (GTArcCommon &&other) noexcept | |
| Move constructor. | |
| GTArcCommon & | operator= (const GTArcCommon &other) |
| Copy assignment operator. | |
| GTArcCommon & | operator= (GTArcCommon &&other) noexcept |
| Move assignment operator. | |
| unsigned int | state () const noexcept |
| Return the state of arc. | |
| void | set_state (unsigned int s) noexcept |
Set the state of arc to value s | |
| ArcInfo & | get_info () noexcept |
| Return a modifiable reference to the arc data. | |
| const ArcInfo & | get_info () const noexcept |
| Return a constant reference to the arc data. | |
| void * | get_connected_node (void *node) noexcept |
| void * | get_img_node (void *node) noexcept |
Public Attributes | |
| Arc_Node * | src_arc_node = nullptr |
| The type of data stored in the arc. | |
| Arc_Node * | tgt_arc_node = nullptr |
Public Attributes inherited from GTArcCommon< ArcInfo > | |
| void * | src_node = nullptr |
| void * | tgt_node = nullptr |
| Please don't use. | |
| Graph_Attr | attrs |
| Please don't use. | |
| ArcInfo | arc_info |
Friends | |
| class | GTArcCommon< _Arc_Info > |
Additional Inherited Members | |
Protected Attributes inherited from Aleph::Dlink | |
| Dlink * | prev |
| Dlink * | next |
Arc of graph implemented with double-linked adjacency lists.
This class defines an arc of a graph implemented with double-linked adjacency lists.
Basically, there are three ways for defining the information to be stored in an arc:
get_info() it is not advisable to use them. They are accessible for implementation purposes.Definition at line 219 of file tpl_graph.H.
| using Aleph::Graph_Arc< _Arc_Info >::Arc_Info = _Arc_Info |
Definition at line 227 of file tpl_graph.H.
| using Aleph::Graph_Arc< _Arc_Info >::Base = GTArcCommon<_Arc_Info> |
Definition at line 225 of file tpl_graph.H.
|
inlinenoexcept |
Copy constructor.
Construct an arc whose data is copied from info. The control attributes are reset.
| [in] | info | data to copy to the arc |
Arc_Info must be defined Definition at line 241 of file tpl_graph.H.
|
inlinenoexcept |
Move or rvalue constructor.
Construct an arc whose data is moved from info. The control attributes are reset.
| [in] | info | data to move to the arc |
Arc_Info must be defined Definition at line 256 of file tpl_graph.H.
|
inline |
Definition at line 262 of file tpl_graph.H.
|
inline |
Definition at line 268 of file tpl_graph.H.
References GTArcCommon< ArcInfo >::arc_info.
Definition at line 190 of file tpl_graph.H.
| Arc_Node* Aleph::Graph_Arc< _Arc_Info >::src_arc_node = nullptr |
The type of data stored in the arc.
Definition at line 229 of file tpl_graph.H.
| Arc_Node* Aleph::Graph_Arc< _Arc_Info >::tgt_arc_node = nullptr |
Definition at line 230 of file tpl_graph.H.