|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
Doubly linked circular list node. More...
#include <dlink.H>
Classes | |
| class | Iterator |
Iterator on Dlink lists. More... | |
Public Member Functions | |
| template<typename T > | |
| Dnode< T > * | to_dnode () noexcept |
Convert this, which must be the link of a Dnode<T>, to that node. | |
| template<typename T > | |
| const Dnode< T > * | to_dnode () const noexcept |
Convert this, which must be the link of a Dnode<T>, to that constant node. | |
| template<typename T > | |
| T & | to_data () noexcept |
Return the item of the Dnode<T> whose link is this. | |
| template<typename T > | |
| const T & | to_data () const noexcept |
Return the constant item of the Dnode<T> whose link is this. | |
| 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 |
See reset(). | |
| 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 |
See insert(Dlink * node). | |
| 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 after this | |
| void | append_list (Dlink *head) noexcept |
Insert the list head before 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 |
See concat_list(Dlink * head). | |
| Dlink * | del () noexcept |
Remove this from the list. this must not be a header node. | |
| void | erase () noexcept |
See del(). | |
| 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 |
See remove_prev(). | |
| Dlink * | remove_first_ne () noexcept |
See remove_next(). | |
| Dlink * | remove_last () noexcept |
See remove_prev(). | |
| Dlink * | remove_first () noexcept |
See remove_next(). | |
| Dlink * | top () const |
See get_next(). | |
| Dlink * | pop () |
See remove_next(). | |
| size_t | reverse_list () noexcept |
| Reverse the list. | |
| size_t | reverse () noexcept |
See reverse_list. | |
| 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. | |
Protected Attributes | |
| Dlink * | prev |
| Dlink * | next |
Doubly linked circular list node.
Dlink is the fundamental building block for doubly linked circular lists in Aleph-w. Each node contains pointers to its previous and next neighbors, forming a circular structure. An empty list consists of a single sentinel node pointing to itself.
This class provides low-level operations for manipulating the list structure. For a higher-level interface with data storage, see Dnode and DynDlist.
|
inlinenoexcept |
|
inlinenoexcept |
Copy constructor.
Be very careful because if l contains items, then these will be lost
Definition at line 127 of file dlink.H.
References Aleph::HTList::is_empty(), l, and reset().
|
inlinenoexcept |
|
inlinenoexcept |
Insert node before this.
| [in] | node | pointer to an empty node (it must not be inserted in another list) |
Definition at line 295 of file dlink.H.
References Aleph::and, next, and prev.
Referenced by List_of_5_nodes::List_of_5_nodes(), Aleph::__dfp_phase1(), Aleph::DynDlist< T >::_append(), Aleph::Polygon::add_vertex(), build_int_list(), build_ptr_list(), Aleph::Unconnected_Components< GT, SA >::compute_blocks(), Aleph::List_Graph< _Graph_Node, _Graph_Arc >::connect_arc(), Aleph::Polygon::copy_points(), create_list_with_header(), cut_list(), Aleph::dlink_random_search(), Aleph::dlink_random_select(), Aleph::GenLinearHashTable< Key, BucketType, Cmp >::expand(), Aleph::Find_Eulerian_Path< GT, SN, SA >::find_node_sequence(), Aleph::tree_node_detail::free_detached_tree(), Aleph::GenLhashTable< Key, BucketType, Cmp >::insert(), Aleph::GenLinearHashTable< Key, BucketType, Cmp >::insert(), Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_arc(), Aleph::Tree_Node< T >::insert_left_sibling(), Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_node(), Aleph::Array_Graph< __Graph_Node, __Graph_Arc >::insert_node(), main(), main(), Aleph::Q_Topological_Sort< GT, Itor, SA >::perform(), Aleph::quicksort(), Aleph::Q_Topological_Sort< GT, Itor, SA >::ranks(), rotate_left(), Aleph::GenLinearHashTable< Key, BucketType, Cmp >::search_or_insert(), Aleph::selection_sort(), DlinkRotationTest::SetUp(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST_F(), TEST_F(), and Aleph::Array_Graph< __Graph_Node, __Graph_Arc >::try_insert_arc().
|
inlinenoexcept |
Insert the list head before this
This method assumes that this is a node part of list; it is not the header node. On the other hand, head is the header node of an entire list. So, all the list head is entirely appended, in constant time, before the node this. After append, the list head becomes empty.
| [in] | head | header for the list to insert |
Definition at line 408 of file dlink.H.
References next, prev, and reset().
Referenced by Aleph::DynDlist< T >::_append(), and TEST_F().
|
inline |
Return true if the list is consistent.
Definition at line 969 of file dlink.H.
References Aleph::Dlink::Iterator::get_curr(), get_next(), get_prev(), Aleph::Dlink::Iterator::has_curr(), Aleph::Dlink::Iterator::next_ne(), Aleph::Dlink::Iterator::prev(), and Aleph::Dlink::Iterator::reset_last().
Referenced by main(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), and TEST().
|
inlinenoexcept |
|
inlinenoexcept |
Concatenate list head to list this
this and head are both header nodes of lists. concat_list(head) concatenates in constant time all the list head after this. After the concatenation head becomes empty.
| head | header node of list to concatenate |
Definition at line 441 of file dlink.H.
References is_empty(), next, prev, reset(), and swap().
Referenced by concat_list(), Aleph::GenLinearHashTable< Key, BucketType, Cmp >::contract(), Aleph::dlink_random_search(), Aleph::dlink_random_select(), Aleph::tree_node_detail::free_detached_tree(), and Aleph::quicksort().
Cut this from link.
cut_list(link) takes a valid link to an item of the list and on that link performs a cut; that is, all the items from link passes to a new list whose head is the return value.
The operation takes constant time.
Dlink object, not a pointer.link belongs to a list, then this one will be in an inconsistent state.| [in] | link | pointer to the item from which the cut will be done |
Dlink header of a new list containing the items from link Definition at line 669 of file dlink.H.
References Aleph::and, append(), del(), is_empty(), next, prev, and swap().
Referenced by Aleph::tree_node_detail::detach_tree(), Aleph::Tree_Node< T >::insert_left_sibling(), Aleph::Tree_Node< T >::insert_leftmost_child(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().
|
inlinenoexcept |
Remove this from the list. this must not be a header node.
Definition at line 468 of file dlink.H.
References Aleph::and, next, prev, and reset().
Referenced by cut_list(), Aleph::DynDlist< T >::Iterator::del(), Aleph::tree_node_detail::detach_tree(), Aleph::Array_Graph< __Graph_Node, __Graph_Arc >::disconnect_arc(), Aleph::List_Graph< _Graph_Node, _Graph_Arc >::disconnect_arc(), erase(), Aleph::GenLinearHashTable< Key, BucketType, Cmp >::expand(), Aleph::Tree_Node< T >::insert_left_sibling(), Aleph::Tree_Node< T >::insert_leftmost_child(), Aleph::DynDlist< T >::remove(), Aleph::List_Graph< _Graph_Node, _Graph_Arc >::remove_arc(), remove_next(), remove_prev(), Aleph::Polygon::remove_vertex(), Aleph::selection_sort(), TEST(), and TEST_F().
|
inlinenoexcept |
|
inlineconstexprnoexcept |
If this is a header node, it return the first node of this
Definition at line 334 of file dlink.H.
References next.
Referenced by Aleph::Array_Graph< __Graph_Node, __Graph_Arc >::get_first_arc(), Aleph::Array_Graph< __Graph_Node, __Graph_Arc >::get_first_node(), Aleph::Random_Graph_Base< GT, Init_Node, Init_Arc >::sort_components(), TEST(), TEST(), TEST(), TEST(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlinenoexcept |
Return the link that is after this
Definition at line 308 of file dlink.H.
References Aleph::and, next, and prev.
Referenced by check(), Aleph::tree_node_detail::detach_tree(), Aleph::Polygon::get_first_vertex(), Aleph::Polygon::get_next_vertex(), Aleph::Tree_Node< T >::lower_link(), Aleph::Dlink::Iterator::next_ne(), Aleph::Vertex::next_vertex(), positions_of(), Aleph::Dlink::Iterator::reset_first(), Aleph::Tree_Node< T >::right_link(), TEST(), TEST_F(), TEST_F(), TEST_F(), and top().
|
inlinenoexcept |
Return the link that is before this
Definition at line 315 of file dlink.H.
References Aleph::and, next, and prev.
Referenced by check(), Aleph::Polygon::get_last_vertex(), Aleph::Polygon::get_prev_vertex(), Aleph::insert_sorted(), Aleph::Tree_Node< T >::left_link(), Aleph::Dlink::Iterator::prev_ne(), Aleph::Vertex::prev_vertex(), Aleph::Dlink::Iterator::reset_last(), TEST(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and Aleph::Tree_Node< T >::upper_link().
|
inlinenoexcept |
See reset().
Definition at line 244 of file dlink.H.
References reset().
Referenced by Aleph::Graph_Anode< Node_Info >::Graph_Anode(), Aleph::Graph_Anode< Node_Info >::Graph_Anode(), Aleph::Graph_Anode< Node_Info >::Graph_Anode(), Aleph::Graph_Anode< Node_Info >::Graph_Anode(), Aleph::Graph_Anode< Node_Info >::Graph_Anode(), and TEST_F().
|
inlinenoexcept |
Insert node after this.
| [in] | node | pointer to an empty node (it must not be linked to nothing |
Definition at line 272 of file dlink.H.
References Aleph::and, next, and prev.
Referenced by List_of_5_nodes::List_of_5_nodes(), Aleph::DynDlist< T >::_insert(), Aleph::GraphCopyWithMapping< GT, Tree >::build_copy(), Aleph::graph_coloring_detail::build_undirected_adj(), Aleph::Random_Graph< GT, Init_Node, Init_Arc >::create_nodes_and_initialize_arc_index(), Aleph::Random_Digraph< GT, Init_Node, Init_Arc >::create_nodes_and_initialize_arc_index(), Aleph::Random_Graph_Base< GT, Init_Node, Init_Arc >::insert_arc(), Aleph::Tree_Node< T >::insert_left_sibling(), Aleph::Tree_Node< T >::insert_leftmost_child(), Aleph::Tree_Node< T >::insert_right_sibling(), Aleph::insert_sorted(), main(), push(), reverse_list(), rotate_right(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST_F(), Aleph::Test_Single_Graph< GT, SN, SA >::test_node(), Aleph::Topological_Sort< GT, Itor, SA >::topological_sort(), and TYPED_TEST().
|
inlinenoexcept |
Insert the list head after this
This method assumes that this is a node part of list; it is not the header node. On the other hand, head is the header node of an entire list. So, all the list head is entirely inserted, in constant time, after the node this. After insertion, the list head becomes empty.
| [in] | head | header for the list to insert |
Definition at line 386 of file dlink.H.
References next, prev, and reset().
Referenced by Aleph::DynDlist< T >::_insert(), and splice().
|
inlineconstexprnoexcept |
Return true if this (as header node) is empty.
Definition at line 250 of file dlink.H.
References Aleph::and, next, and prev.
Referenced by Aleph::Array_Graph< __Graph_Node, __Graph_Arc >::Array_Graph(), Dlink(), Aleph::DynDlist< T >::DynDlist(), Aleph::Polygon::Vertex_Iterator::Vertex_Iterator(), Eepic_Plane::~Eepic_Plane(), Aleph::DynDlist< T >::Iterator::append_list(), Aleph::Array_Graph< __Graph_Node, __Graph_Arc >::clear(), Aleph::compute_bipartite(), concat_list(), Aleph::GenLinearHashTable< Key, BucketType, Cmp >::contract(), cut_list(), Aleph::Polygon::delete_points(), Aleph::dlink_random_search(), Aleph::dlink_random_select(), Aleph::DynDlist< T >::empty(), Aleph::GenLinearHashTable< Key, BucketType, Cmp >::empty(), Aleph::GenLinearHashTable< Key, BucketType, Cmp >::expand(), Aleph::tree_node_detail::free_detached_tree(), Aleph::DynDlist< T >::get_first(), Aleph::Dnode< T >::get_first(), Aleph::DynDlist< T >::get_first(), Aleph::Polygon::get_first_vertex(), Aleph::DynDlist< T >::get_last(), Aleph::Dnode< T >::get_last(), Aleph::DynDlist< T >::get_last(), Aleph::Polygon::get_last_vertex(), Aleph::GenLinearHashTable< Key, BucketType, Cmp >::insert(), Aleph::DynDlist< T >::Iterator::insert_list(), Aleph::Dlink::Iterator::is_in_first(), Aleph::Dlink::Iterator::is_last(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_next_available_entry(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_next_available_entry_ne(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_prev_available_entry(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_prev_available_entry_ne(), main(), Aleph::Vertex::next_vertex(), Aleph::HalfPlaneIntersection::operator()(), operator=(), pop(), Aleph::Vertex::prev_vertex(), Aleph::GenLinearHashTable< Key, BucketType, Cmp >::print(), Aleph::quicksort(), remove_all_and_delete(), Aleph::Dnode< T >::remove_first(), Aleph::DynDlist< T >::remove_first(), Aleph::Dnode< T >::remove_last(), Aleph::DynDlist< T >::remove_last(), remove_next(), remove_prev(), reverse_list(), rotate_left(), rotate_right(), Aleph::GenLinearHashTable< Key, BucketType, Cmp >::search(), Aleph::GenLinearHashTable< Key, BucketType, Cmp >::search_or_insert(), Aleph::GenLinearHashTable< Key, BucketType, Cmp >::search_with_custom_hash(), Aleph::selection_sort(), splice(), split_list_ne(), swap(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), top(), TYPED_TEST(), TYPED_TEST(), Aleph::vertex_connectivity(), and wrap_header().
|
inlineconstexprnoexcept |
Return true if this (as header node) has exactly one element.
Definition at line 256 of file dlink.H.
References Aleph::and, next, and prev.
Referenced by Aleph::Vertex::next_vertex(), Aleph::Vertex::prev_vertex(), TEST(), TEST(), TEST(), TEST(), TEST_F(), and TEST_F().
|
inlineconstexprnoexcept |
Return true if this (as header node) has zero or one element.
Definition at line 262 of file dlink.H.
Referenced by Aleph::Polygon::Segment_Iterator::Segment_Iterator(), Aleph::Polygon::get_first_segment(), Aleph::Polygon::get_last_segment(), Aleph::quicksort(), TEST(), TEST(), and TEST().
Copy assignation.
this has items, because these will be lost| [in] | l | link to be copied |
Definition at line 204 of file dlink.H.
References is_empty(), Aleph::HTList::is_empty(), l, next, and prev.
Move assignation.
Assign a rvalue list to this without copying.
| [in] | l | rvalue reference to the list to move from. |
l is rvalue reference, take care of that if you are interested in to avoid the copy. So, if you have a lvalue reference to a list, use std::move(), upon your responsability, if and only if you are absolutely sure that the list will not be needed after.
|
inline |
See remove_next().
Definition at line 558 of file dlink.H.
References ah_underflow_error_if, is_empty(), and remove_next().
Referenced by TEST().
|
inlinenoexcept |
See insert(Dlink * node).
Definition at line 285 of file dlink.H.
References insert().
Referenced by TEST().
|
inlinenoexcept |
Remove and free memory for all the items of list.
remove_all_and_delete() remove each item of the list and call to delete operator on the removed item. At the end of call, all the items were removed, all the memory freed qand the list emptied.
new. Although That is very frequently the case, there are some exceptions. So, be sure that the items were allocated with new operator. Definition at line 921 of file dlink.H.
References is_empty(), and remove_next().
|
inlinenoexcept |
See remove_next().
Definition at line 545 of file dlink.H.
References remove_next().
Referenced by Aleph::Array_Graph< __Graph_Node, __Graph_Arc >::clear(), rotate_left(), TEST(), TEST(), TEST(), TEST(), and TEST_F().
|
inlinenoexcept |
See remove_next().
Definition at line 533 of file dlink.H.
References remove_next().
Referenced by Aleph::GenLinearHashTable< Key, BucketType, Cmp >::empty().
|
inlinenoexcept |
See remove_prev().
Definition at line 539 of file dlink.H.
References remove_prev().
Referenced by rotate_right(), TEST(), TEST(), and TEST_F().
|
inlinenoexcept |
|
inlinenoexcept |
Remove the item that is after this
Remove the item successor of this.
this is a header node, then this method is equivalent to remove the first node.this must not be a header node.Definition at line 516 of file dlink.H.
References del(), is_empty(), and next.
Referenced by List_of_5_nodes::~List_of_5_nodes(), Aleph::Polygon::delete_points(), Aleph::dlink_random_search(), Aleph::dlink_random_select(), Aleph::tree_node_detail::free_detached_tree(), pop(), Aleph::quicksort(), remove_all_and_delete(), remove_first(), remove_first_ne(), Aleph::Dnode< T >::remove_first_ne(), Aleph::Dnode< T >::remove_next(), and reverse_list().
|
inlinenoexcept |
Remove the item that is before this
Remove the item predecessor of this.
this is a header node, then this method is equivalent to remove the last node.this must not be a header node.Definition at line 495 of file dlink.H.
References del(), is_empty(), and prev.
Referenced by remove_last(), remove_last_ne(), Aleph::Dnode< T >::remove_last_ne(), and Aleph::Dnode< T >::remove_prev().
|
inlinenoexcept |
Reset this
reset() reinitialize the node to point to itself. So, all the context is lost. Use with care.
Definition at line 238 of file dlink.H.
Referenced by Dlink(), append_list(), concat_list(), del(), init(), insert_list(), split_list_ne(), swap(), and TEST_F().
|
inlinenoexcept |
See reverse_list.
Definition at line 584 of file dlink.H.
References reverse_list().
Referenced by Aleph::DynDlist< T >::reverse().
|
inlinenoexcept |
|
inline |
Rotate to left the list n positions.
rotate_left(n) rotates the items to left n positions. For example, if the list is as follows:
l0, l1, l2, l3, l4, l5, l6, l7, l8, l9
Then rotate_left(4) produces the following state:
l4, l5, l6, l7, l8, l9, l0, l1, l2, l3
| [in] | n | the number of position to be rotated |
| domain_error | if list is empty |
Definition at line 941 of file dlink.H.
References ah_domain_error, append(), is_empty(), and remove_first().
|
inline |
Analogous to rotate_left() but to right.
Definition at line 955 of file dlink.H.
References ah_domain_error, insert(), is_empty(), and remove_last().
|
inlinenoexcept |
Insert a list l without header node after the node this.
| [in] | l | list without header node to be inserted after this |
Definition at line 424 of file dlink.H.
References insert_list(), is_empty(), l, and wrap_header().
Referenced by Aleph::tree_node_detail::detach_tree().
Definition at line 645 of file dlink.H.
References l, r, and split_list_ne().
Referenced by Aleph::DynDlist< T >::split_list_ne(), TEST(), TEST(), TEST(), and TEST_F().
Split this in the middle in two lists.
split_list(l, r) cuts this in its middle: l takes its first n - n / 2 nodes and r the last n / 2, in their order. After the operation, this becomes empty. It walks from both ends to the middle and splices the two halves, without moving the nodes one by one.
l and r must be empty before calling this method.| [out] | l | the first n - n / 2 nodes of this |
| [out] | r | the last n / 2 nodes of this |
this had before the split) Definition at line 604 of file dlink.H.
References Aleph::and, is_empty(), Aleph::HTList::is_empty(), l, next, prev, r, and reset().
Referenced by split_list().
|
inlinenoexcept |
|
inlinenoexcept |
Swap this with list whose header is link.
swap(link) swaps the content og this with all the content of the list pointed by link. The operation is performed in constant time independently of sizes of both lists.
| [in] | link | pointer to the list to be swapped |
Definition at line 141 of file dlink.H.
References Aleph::and, is_empty(), next, prev, and reset().
Referenced by Dlink(), Aleph::Dnode< T >::Dnode(), Aleph::Polygon::Polygon(), concat_list(), cut_list(), Aleph::dlink_random_search(), operator=(), Aleph::Polygon::operator=(), reverse_list(), Aleph::selection_sort(), Aleph::Array_Graph< __Graph_Node, __Graph_Arc >::swap(), swap(), Aleph::Dnode< T >::swap(), Aleph::DynDlist< T >::swap(), Aleph::GenLinearHashTable< Key, BucketType, Cmp >::swap(), Aleph::List_Graph< _Graph_Node, _Graph_Arc >::swap(), Aleph::Net_Graph< NodeT, ArcT >::swap_contents(), TEST(), TEST(), TEST_F(), and TEST_F().
Return the constant item of the Dnode<T> whose link is this.
Definition at line 355 of file tpl_dnode.H.
Return the item of the Dnode<T> whose link is this.
Definition at line 350 of file tpl_dnode.H.
References Aleph::Dnode< T >::get_data().
Referenced by TEST().
Convert this, which must be the link of a Dnode<T>, to that constant node.
Definition at line 345 of file tpl_dnode.H.
Convert this, which must be the link of a Dnode<T>, to that node.
Definition at line 340 of file tpl_dnode.H.
Referenced by TEST().
|
inline |
See get_next().
Definition at line 551 of file dlink.H.
References ah_underflow_error_if, get_next(), and is_empty().
Referenced by TEST().
|
inlinenoexcept |
Wrap a header to a list (without header).
Sometimes, especially for low level applications, you coult manage linked list without header nodes. In this case, in order to profit some operations expeting a list with header, you could "wrap" a temporal header and use the list and the operations of this class.
For example, suppose we have a list l without header node and we wish to insert it into a another list with a header node. In this case, we wrap a header to l as follows:
Dlink h; h.wrap_header(l);
Now, if we have a node p of another list, we could insert l after p as follows:
p->insert_list(&h);
After this operation h becomes empty and the list l is inserted after the node p
| [in] | l | first node of a double and circular list without header node |
Definition at line 370 of file dlink.H.
References Aleph::DynList< T >::append(), is_empty(), and l.
Referenced by Aleph::tree_node_detail::free_detached_tree(), and splice().
|
mutableprotected |
Definition at line 103 of file dlink.H.
Referenced by append(), append_list(), concat_list(), cut_list(), del(), get_first(), get_first_ne(), get_next(), Aleph::Dnode< T >::get_next(), get_prev(), imprime(), insert(), insert_list(), is_empty(), Aleph::Dlink::Iterator::is_in_first(), is_unitarian(), is_unitarian_or_empty(), operator=(), remove_next(), reset(), split_list_ne(), and swap().
|
mutableprotected |
Definition at line 102 of file dlink.H.
Referenced by append(), append_list(), concat_list(), cut_list(), del(), get_last(), get_last_ne(), get_next(), get_prev(), Aleph::Dnode< T >::get_prev(), insert(), insert_list(), is_empty(), Aleph::Dlink::Iterator::is_last(), is_unitarian(), is_unitarian_or_empty(), operator=(), remove_prev(), reset(), split_list_ne(), and swap().