|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
Dynamic doubly linked list with O(1) size and bidirectional access. More...
#include <tpl_dynDlist.H>
Classes | |
| class | Iterator |
| Iterator dynamic list. More... | |
Public Types | |
| using | Set_Type = DynDlist |
| The type of container. | |
| using | Item_Type = T |
| The type of element that stores the container. | |
| using | Key_Type = T |
| The type of element that stores the container. | |
| using | Const_Iterator = Aleph::Const_Iterator< Iterator > |
| Read-only iterator: the iterator of a constant container. | |
Public Types inherited from Aleph::Dnode< T > | |
| using | key_type = T |
| The data type. | |
Public Types inherited from StlAlephIterator< SetName > | |
| using | iterator = StlIterator< SetName > |
| using | const_iterator = StlConstIterator< SetName > |
Public Member Functions | |
| const size_t & | size () const noexcept |
| Return the number of elements (constant time) | |
| DynDlist ()=default | |
| template<template< typename > class List> | |
| DynDlist (const List< T > &l) | |
| template<class It > requires (not std::is_arithmetic_v<It> and requires (It it) { *it; ++it; it != it; }) | |
| DynDlist (It b, It e) | |
| DynDlist (std::initializer_list< T > l) | |
| void | empty () noexcept |
@brief Empties the container. | |
| void | clear () noexcept |
@brief Empties the container. | |
| ~DynDlist () | |
| Destructor. | |
| T & | insert (const T &item) |
| Insert a copy of item at the beginning of the list. | |
| T & | insert (T &&item) |
| Insert a moved item at the beginning of the list. | |
| T & | append (const T &item) |
| Append a copied item at the end of the list. | |
| T & | append (T &&item) |
| Append a moved item at the end of the list. | |
| void | insert (const DynDlist &list) |
Insert all the elements of list before this. | |
| void | insert (DynDlist &&list) noexcept |
See insert(const DynDlist & list). | |
| void | append (const DynDlist &list) |
Append all the elements of list after this. | |
| void | append (DynDlist &&list) noexcept |
See append(const DynDlist & list). | |
| T & | get_first_ne () noexcept |
| Return a modifiable reference to first item in the list. | |
| const T & | get_first_ne () const noexcept |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. A reference to const. | |
| T & | get_last_ne () noexcept |
| Return a modifiable reference to last item in the list. | |
| const T & | get_last_ne () const noexcept |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. A reference to const. | |
| T & | get_first () |
| Return a modifiable reference to first item in the list. | |
| const T & | get_first () const |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. A reference to const. | |
| T & | get_last () |
| Return a modifiable reference to last item in the list. | |
| const T & | get_last () const |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. A reference to const. | |
| T | remove_first_ne () noexcept(std::is_nothrow_move_constructible_v< T >) |
| Remove the first item of the list, which must not be empty. | |
| T | remove_last_ne () noexcept(std::is_nothrow_move_constructible_v< T >) |
| Remove the last item of the list, which must not be empty. | |
| T | remove_first () |
| Remove the first item of the list; return a copy of removed item. | |
| T | remove_last () |
| Remove the last item of the list; return a copy of removed item. | |
| T & | put (const T &item) |
See append(const T & item). | |
| T & | put (T &&item) |
See append(T && item). | |
| T | get () |
See remove_first(). | |
| T & | rear () |
If this was treated as a queue, the it returns the most recently inserted item. | |
| T & | front () |
If this was treated as a queue, the it returns the most oldlest inserted item. | |
| T & | push (const T &item) |
See insert(const T & item). | |
| T & | push (T &&item) |
See insert(T && item). | |
| T | pop () |
See remove_first(). | |
| T & | top () |
See get_first(). | |
| const T & | top () const |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. A reference to const. | |
| void | remove (T &data) noexcept |
| Assuming that data is a reference to the item in the list, it removes the item. | |
| void | erase (T &data) noexcept |
See remove(T & data). | |
| void | swap (DynDlist &l) noexcept |
Swap in constant time all the items of this with all the items of l (very fast!) | |
| void | split_list_ne (DynDlist &l, DynDlist &r) noexcept |
| Split the list in two. | |
| void | split_list (DynDlist &l, DynDlist &r) |
| Split the list in two. | |
| void | split (DynDlist &l, DynDlist &r) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Alias for split_list. | |
| DynDlist< T > & | operator= (const DynDlist &list) |
| Assignment by copy. | |
| DynDlist (const DynDlist &list) | |
Copy constructor; all items of list are copied. | |
| DynDlist (DynDlist &&list) noexcept | |
Move constructor: takes in constant time the items of list, which is left empty. | |
| DynDlist (DynDlist &&list) noexcept(std::is_nothrow_move_constructible_v< T >) | |
Move constructor for a T whose default construction may throw, as one that allocates, and that can be moved: takes in constant time the items of list, which is left empty. | |
| DynDlist (DynDlist &&list) | |
Move constructor for a T whose default construction may throw and that cannot be moved, as one whose move constructor is deleted: takes in constant time the items of list, which is left empty. | |
| DynDlist< T > & | operator= (DynDlist &&list) noexcept |
| Assignment by moving. | |
| T & | operator[] (const size_t n) |
| Return a modifiable reference to the i-th item of the list. | |
| const T & | operator[] (const size_t n) const |
| Return a reference to const to the i-th item of the list. | |
| DynDlist & | reverse () noexcept |
| DynDlist & | rev () noexcept |
| DynDlist< T > | reverse () const |
Return a reversed copy of this | |
| DynDlist< T > | rev () const |
Public Member Functions inherited from Aleph::Dnode< T > | |
| Dnode< T > *& | get_next () const noexcept |
Return the next node to this | |
| Dnode< T > *& | get_prev () const noexcept |
Return the previous node to this | |
| Dnode< T > * | remove_prev () noexcept |
Remove the previous node to this; return its address. | |
| Dnode< T > * | remove_next () noexcept |
Remove the next node to this; return its address. | |
| Dnode< T > *& | get_first_ne () const noexcept |
| Get the first node. | |
| Dnode< T > *& | get_last_ne () const noexcept |
| Get the last node. | |
| Dnode< T > *& | get_first () const |
| Get the first node. | |
| Dnode< T > *& | get_last () const |
| Get the last node. | |
| Dnode< T > * | remove_last_ne () noexcept |
| Remove the last node and return its address. | |
| Dnode< T > * | remove_first_ne () noexcept |
| Remove the first node and return its address. | |
| Dnode< T > * | remove_last () |
| Remove the last node and return its address. | |
| Dnode< T > * | remove_first () |
| Remove the first node and return its address. | |
| Dnode () noexcept(std::is_nothrow_default_constructible_v< T >) | |
Construct a node, or the header of an empty list, whose item is T(): zero for an arithmetic type or a pointer. | |
| Dnode (const T &item) | |
Construct a node with a copy of item | |
| Dnode (T &&item) | |
| Construct a new node with the item moved. | |
| Dnode & | swap (Dnode &p) |
Swap this with p | |
| Dnode (const Dnode &node) | |
| Copy constructor. | |
| Dnode (Dnode &&node) noexcept | |
Move constructor: takes the place of node in its list and moves its item, which cannot throw. | |
| Dnode (Dnode &&node) | |
Move constructor for an item whose move may throw: moves the item of node and then takes its place in its list. | |
| Dnode & | operator= (const Dnode &p) |
| Copy assigment. | |
| Dnode & | operator= (Dnode &&p) |
| Move asignment. | |
| T & | get_data () noexcept |
| Return a modifiable reference to the data contained in the node. | |
| const T & | get_data () const noexcept |
| Return a modifiable reference to the data contained in the node. | |
| T & | get_key () noexcept |
See get_data(). | |
| const T & | get_key () const noexcept |
See get_data(). | |
Public Member Functions inherited from Aleph::Dlink | |
| 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. | |
Public Member Functions inherited from GenericTraverse< Container > | |
| template<class Operation > requires Aleph::PredicateWith<Operation &, typename Aleph::concepts_detail::traverse_arg<Container, Operation>::type> | |
| bool | traverse (Operation &operation) noexcept(traverse_is_noexcept< Operation, typename Aleph::concepts_detail::traverse_arg< Container, Operation >::type, Container & >()) |
| Traverse the container via its iterator and performs a conditioned operation on each item. | |
| template<class Operation > requires Aleph::PredicateWith<Operation &, typename Aleph::concepts_detail::traverse_carg<Container, Operation>::type> | |
| bool | traverse (Operation &operation) const noexcept(traverse_is_noexcept< Operation, typename Aleph::concepts_detail::traverse_carg< Container, Operation >::type, const_source_t< Operation > >()) |
| Traverse a constant container; each item is handed out as a constant reference. | |
| template<class Operation > requires Aleph::PredicateWith<Operation &, typename Aleph::concepts_detail::traverse_carg<Container, Operation>::type> | |
| bool | traverse (Operation &&operation) const noexcept(traverse_is_noexcept< Operation, typename Aleph::concepts_detail::traverse_carg< Container, Operation >::type, const_source_t< Operation > >()) |
Overload of traverse(Operation &) const that accepts rvalues. | |
| template<class Operation > requires Aleph::PredicateWith<Operation &, typename Aleph::concepts_detail::traverse_arg<Container, Operation>::type> | |
| bool | traverse (Operation &&operation) noexcept(traverse_is_noexcept< Operation, typename Aleph::concepts_detail::traverse_arg< Container, Operation >::type, Container & >()) |
Overload of traverse(Operation &) that accepts rvalues. | |
Public Member Functions inherited from SpecialCtors< Container, T > | |
| SpecialCtors ()=default | |
| Default constructor; it appends nothing. | |
| SpecialCtors (const SpecialCtors &)=default | |
| Copy constructor; the derived container copies its items. | |
| SpecialCtors (SpecialCtors &&) noexcept | |
| Move constructor; the derived container moves its items. | |
| SpecialCtors & | operator= (const SpecialCtors &)=default |
| Copy assignment; the derived container copies its items. | |
| SpecialCtors & | operator= (SpecialCtors &&) noexcept |
| Move assignment; the derived container moves its items. | |
| SpecialCtors (const Aleph::DynList< T > &l) | |
Build the container by inserting all items of the list l. | |
| template<class It > requires (not std::is_arithmetic_v<It> and requires(It it) { *it; ++it; it != it; }) | |
| SpecialCtors (It b, It e) | |
| Construct the container from a range of iterators. | |
| SpecialCtors (std::initializer_list< T > l) | |
| Construct the container from an initializer list. | |
Public Member Functions inherited from LocateFunctions< Container, Type > | |
| auto | get_it () |
| Return a properly initialized iterator positioned at the first item on the container. | |
| auto | get_it () const |
| Read-only iterator positioned at the first item. | |
| auto | get_it (const size_t pos) |
Return a properly initialized iterator positioned at the pos item on the container. | |
| auto | get_it (const size_t pos) const |
Read-only iterator positioned at the pos item. | |
| auto | get_itor () |
Alias of get_it(). | |
| auto | get_itor () const |
See get_itor(). | |
| template<class C = Container> requires Aleph::dry_detail::MutablyTraversable<C, Type> | |
| Type & | nth_ne (const size_t n) noexcept(Aleph::dry_detail::mutable_traversal_is_noexcept< C, Type >) |
| Return the n‑th element without bounds checking. | |
| const Type & | nth_ne (const size_t n) const noexcept(Aleph::dry_detail::const_traversal_is_noexcept< Container, Type >) |
Constant overload of nth_ne(size_t). | |
| template<class C = Container> requires Aleph::dry_detail::MutablyTraversable<C, Type> | |
| Type & | nth (const size_t n) |
| Return the n-th item of the container. | |
| const Type & | nth (const size_t n) const |
Const overload of nth(size_t). | |
| template<class Operation > requires Aleph::InvocablePredicateWith<Operation &, Type &> | |
| and Aleph::dry_detail::MutablyTraversable< typename Aleph::concepts_detail::defer< Container, Operation >::type, Type > Type * | find_ptr (Operation &operation) noexcept(mutable_search_is_noexcept< Operation >()) |
| Find a pointer to an item in the container according to a searching criterion. | |
| template<class Operation > requires Aleph::InvocablePredicateWith<Operation &, const Type &> | |
| const Type * | find_ptr (Operation &operation) const noexcept(const_search_is_noexcept< Operation >()) |
Const overload of find_ptr(Operation&). | |
| template<class Operation > requires Aleph::InvocablePredicateWith<Operation &, const Type &> | |
| const Type * | find_ptr (Operation &&operation) const noexcept(const_search_is_noexcept< Operation >()) |
| Overload of find_ptr() const that accepts rvalues. | |
| template<class Operation > requires Aleph::InvocablePredicateWith<Operation &, Type &> | |
| and Aleph::dry_detail::MutablyTraversable< typename Aleph::concepts_detail::defer< Container, Operation >::type, Type > Type * | find_ptr (Operation &&operation) noexcept(mutable_search_is_noexcept< Operation >()) |
| Overload of find_ptr() that accepts rvalues. | |
| template<class Operation > requires Aleph::InvocablePredicateWith<Operation &, const Type &> | |
| size_t | find_index (Operation &operation) const noexcept(const_search_is_noexcept< Operation >()) |
| Find the position of an item in the container according to a searching criterion. | |
| template<class Operation > requires Aleph::InvocablePredicateWith<Operation &, const Type &> | |
| size_t | find_index (Operation &&operation) const noexcept(const_search_is_noexcept< Operation >()) |
| Overload of find_index() that accepts rvalues. | |
| template<class Operation , class T = Type> requires Aleph::InvocablePredicateWith<Operation &, const Type &> | |
| and std::default_initializable< T > and std::copy_constructible< T > std::tuple< bool, Type > | find_item (Operation &operation) const noexcept(find_item_is_noexcept< Operation >()) |
| Safe sequential searching of an item matching a criterion. | |
| template<class Operation , class T = Type> requires Aleph::InvocablePredicateWith<Operation &, const Type &> | |
| and std::default_initializable< T > and std::copy_constructible< T > std::tuple< bool, Type > | find_item (Operation &&operation) const noexcept(find_item_is_noexcept< Operation >()) |
| Overload of find_item() that accepts rvalues. | |
| template<class Operation , class T = Type> requires Aleph::InvocablePredicateWith<Operation &, const Type &> | |
| and std::copy_constructible< T > std::optional< Type > | find_opt (Operation &operation) const |
| Copy of the first item satisfying a criterion, if any. | |
| template<class Operation , class T = Type> requires Aleph::InvocablePredicateWith<Operation &, const Type &> | |
| and std::copy_constructible< T > std::optional< Type > | find_opt (Operation &&operation) const |
| Overload of find_opt() that accepts rvalues. | |
| template<class Operation > requires Aleph::InvocablePredicateWith<Operation &, const Type &> | |
| bool | contains_if (Operation &&operation) const noexcept(const_search_is_noexcept< Operation >()) |
| Test if an item satisfying a criterion is present in the container. | |
| template<class T = Type> requires requires(const T & a, const T & b) { { a == b } -> std::convertible_to<bool>; } | |
| bool | contains (const Type &item) const |
| Test if an item is present in the container using equality. | |
Public Member Functions inherited from FunctionalMethods< Container, T > | |
| void | emplace (Args &&... args) |
| Appends a new element into the container by constructing it from the given args. | |
| void | emplace_end (Args &&... args) |
See emplace(Args && ... args). | |
| void | emplace_ins (Args &&... args) |
| template<typename... Args> requires ((std::convertible_to<Args &&, T> and ...) and (Aleph::InsertableWith<typename Aleph::concepts_detail::defer<Container, std::tuple<Args...>>::type, Item_Arg<Args>> and ...)) | |
| size_t | ninsert (Args &&... args) |
| Insert n variadic items. | |
| template<typename... Args> requires ((std::convertible_to<Args &&, T> and ...) and (Aleph::AppendableWith<typename Aleph::concepts_detail::defer<Container, std::tuple<Args...>>::type, Item_Arg<Args>> and ...)) | |
| size_t | nappend (Args &&... args) |
| Append n variadic items. | |
| template<class Operation > requires Aleph::InvocableWith<Operation &, const T &> | |
| void | for_each (Operation &operation) const |
| Traverse all the container and performs an operation on each element. | |
| template<class Operation > requires Aleph::InvocableWith<Operation &, const T &> | |
| void | for_each (Operation &&operation) const |
| Overload of for_each() that accepts rvalues. | |
| template<class Operation > requires Aleph::InvocableWith<Operation &, const T &> | |
| void | each (Operation &operation) const |
| Alias of for_each(). | |
| template<class Operation > requires Aleph::InvocableWith<Operation &, const T &> | |
| void | each (Operation &&operation) const |
| Alias of for_each() that accepts rvalues. | |
| template<class Operation > requires Aleph::InvocableWith<Operation &, const T &> | |
| void | each (const size_t pos, const size_t slice, Operation &operation) const |
Traverse the container starting at pos taking one item every slice, performing an operation on each visited element. | |
| template<class Operation > requires Aleph::InvocableWith<Operation &, const T &> | |
| void | each (const size_t pos, const size_t slice, Operation &&operation) const |
See each(size_t pos, size_t slice, Operation & operation) const. | |
| template<class Operation > requires Aleph::InvocableWith<Operation &, T &> | |
| and Aleph::dry_detail::MutablyTraversable< typename Aleph::concepts_detail::defer< Container, Operation >::type, T > void | each (const size_t pos, const size_t slice, Operation &operation) |
Traverse the container starting at pos taking one item every slice, performing an operation that may modify each visited item. | |
| template<class Operation > requires Aleph::InvocableWith<Operation &, T &> | |
| and Aleph::dry_detail::MutablyTraversable< typename Aleph::concepts_detail::defer< Container, Operation >::type, T > void | each (const size_t pos, const size_t slice, Operation &&operation) |
See each(size_t pos, size_t slice, Operation & operation). | |
| template<class Operation > requires Aleph::InvocableWith<Operation &, T &> | |
| and Aleph::dry_detail::MutablyTraversable< typename Aleph::concepts_detail::defer< Container, Operation >::type, T > void | mutable_for_each (Operation &operation) |
| Apply a mutable operation to each element of the container. | |
| template<class Operation > requires Aleph::InvocableWith<Operation &, T &> | |
| and Aleph::dry_detail::MutablyTraversable< typename Aleph::concepts_detail::defer< Container, Operation >::type, T > void | mutable_for_each (Operation &&operation) |
See mutable_for_each(Operation & operation). | |
| template<class Operation > requires Aleph::InvocablePredicateWith<Operation &, const T &> | |
| bool | all (Operation &operation) const |
| Check if all the elements of the container satisfy a condition. | |
| template<class Operation > requires Aleph::InvocablePredicateWith<Operation &, const T &> | |
| bool | all (Operation &&operation) const |
| Overload of all() that accepts rvalues. | |
| template<class Operation > requires Aleph::InvocablePredicateWith<Operation &, const T &> | |
| bool | exists (Operation &op) const |
| Test for existence in the container of an element satisfying a criterion. | |
| template<class Operation > requires Aleph::InvocablePredicateWith<Operation &, const T &> | |
| bool | exists (Operation &&op) const |
| Overload of exists() that accepts rvalues. | |
| template<class Operation > requires Aleph::InvocablePredicateWith<Operation &, const T &> | |
| bool | none (Operation &op) const |
| Test that no element satisfies a criterion. | |
| template<class Operation > requires Aleph::InvocablePredicateWith<Operation &, const T &> | |
| bool | none (Operation &&op) const |
| Overload of none() that accepts rvalues. | |
| template<class Operation > requires Aleph::InvocablePredicateWith<Operation &, const T &> | |
| size_t | count_if (Operation &op) const |
| Count the elements that satisfy a criterion. | |
| template<class Operation > requires Aleph::InvocablePredicateWith<Operation &, const T &> | |
| size_t | count_if (Operation &&op) const |
| Overload of count_if() that accepts rvalues. | |
| Aleph::DynList< Aleph::dry_detail::map_result_t< R, Operation &, T > > | maps (Operation &op) const |
| Aleph::DynList< Aleph::dry_detail::map_result_t< R, Operation &, T > > | maps (Operation &&op) const |
| Aleph::DynList< Aleph::dry_detail::map_result_t< R, Operation &, T > > | maps_if (Prop prop, Operation &op) const |
| Aleph::DynList< Aleph::dry_detail::map_result_t< R, Operation &, T > > | maps_if (Prop prop, Operation &&op) const |
| Aleph::DynList< Aleph::dry_detail::map_result_t< R, Operation &, T > > | map (Operation &op) const |
| Aleph::DynList< Aleph::dry_detail::map_result_t< R, Operation &, T > > | map (Operation &&op) const |
| Aleph::DynList< Aleph::dry_detail::map_result_t< R, Operation &, T > > | map_if (Prop prop, Operation &op) const |
| Aleph::DynList< Aleph::dry_detail::map_result_t< R, Operation &, T > > | map_if (Prop prop, Operation &&op) const |
| template<class Operation > requires Aleph::InvocableWith<Operation &, const T &> | |
| auto | flat_map (Operation &op) const |
| Map each element to a container and concatenate the results. | |
| template<class Operation > requires Aleph::InvocableWith<Operation &, const T &> | |
| auto | flat_map (Operation &&op) const |
| Overload of flat_map() that accepts rvalues. | |
| Aleph::DynList< T > | to_dynlist () const |
| Convert container to DynList. | |
| std::vector< T > | to_vector () const |
| Convert container to std::vector. | |
| template<typename Acc = T, class Op > requires Aleph::dry_detail::FoldOperation<Op, Acc, T> | |
| Acc | foldl (const Acc &init, Op &op) const |
| Fold the elements of the container to a specific result. | |
| template<typename Acc = T, class Op > requires Aleph::dry_detail::FoldOperation<Op, Acc, T> | |
| Acc | foldl (const Acc &init, Op &&op) const |
| Overload of foldl() that accepts rvalues. | |
| template<typename Acc = T, class Op > requires Aleph::dry_detail::FoldOperation<Op, Acc, T> | |
| Acc | fold_left (const Acc &init, Op &op) const |
| Alias for foldl(). | |
| template<typename Acc = T, class Op > requires Aleph::dry_detail::FoldOperation<Op, Acc, T> | |
| Acc | fold_left (const Acc &init, Op &&op) const |
| Overload of fold_left() that accepts rvalues. | |
| template<class Operation > requires Aleph::dry_detail::FoldOperation<Operation, T, T> | |
| T | fold (const T &init, Operation &operation) const |
| Simplified version of foldl() where the folded type is the same type of elements stored in the container. | |
| template<class Operation > requires Aleph::dry_detail::FoldOperation<Operation, T, T> | |
| T | fold (const T &init, Operation &&operation) const |
| Overload of fold() that accepts rvalues. | |
| template<typename Acc = T, class Op > requires Aleph::dry_detail::FoldRightOperation<Op, Acc, T> | |
| Acc | foldr (const Acc &init, Op &op) const |
| Fold the elements from the last to the first. | |
| template<typename Acc = T, class Op > requires Aleph::dry_detail::FoldRightOperation<Op, Acc, T> | |
| Acc | foldr (const Acc &init, Op &&op) const |
| Overload of foldr() that accepts rvalues. | |
| template<class Op , class U = T> requires Aleph::dry_detail::FoldOperation<Op, T, T> | |
| and std::copy_constructible< U > std::optional< T > | reduce (Op &op) const |
| Fold the elements with no initial value. | |
| template<class Op , class U = T> requires Aleph::dry_detail::FoldOperation<Op, T, T> | |
| and std::copy_constructible< U > std::optional< T > | reduce (Op &&op) const |
| Overload of reduce() that accepts rvalues. | |
| template<class Operation > requires Aleph::InvocablePredicateWith<Operation &, const T &> | |
| Aleph::DynList< T > | filter (Operation &operation) const |
| Filter the elements of a container according to a matching criterion. | |
| template<class Operation > requires Aleph::InvocablePredicateWith<Operation &, const T &> | |
| Aleph::DynList< T > | filter (Operation &&operation) const |
| Overload of filter() that accepts rvalues. | |
| template<class Operation > requires Aleph::InvocablePredicateWith<Operation &, const T &> | |
| Aleph::DynList< const T * > | ptr_filter (Operation &operation) const |
| Filter the elements of a container according to a matching criterion and return a pointer to the matched items in the container. | |
| template<class Operation > requires Aleph::InvocablePredicateWith<Operation &, const T &> | |
| Aleph::DynList< const T * > | ptr_filter (Operation &&operation) const |
| Overload of ptr_filter() that accepts rvalues. | |
| template<class Operation > requires Aleph::InvocablePredicateWith<Operation &, const T &> | |
| Aleph::DynList< std::tuple< T, size_t > > | pfilter (Operation &operation) const |
| Filter the elements of a container according to a matching criterion and determine its positions respect to the traversal of container. | |
| template<class Operation > requires Aleph::InvocablePredicateWith<Operation &, const T &> | |
| Aleph::DynList< std::tuple< T, size_t > > | pfilter (Operation &&operation) const |
| Overload of pfilter() that accepts rvalues. | |
| template<class Operation > requires Aleph::InvocablePredicateWith<Operation &, const T &> | |
| std::pair< Aleph::DynList< T >, Aleph::DynList< T > > | partition (Operation &op) const |
| Exclusive partition of container according to a filter criterion. | |
| template<class Operation > requires Aleph::InvocablePredicateWith<Operation &, const T &> | |
| std::pair< Aleph::DynList< T >, Aleph::DynList< T > > | partition (Operation &&op) const |
| Overload of partition() that accepts rvalues. | |
| std::pair< Aleph::DynList< T >, Aleph::DynList< T > > | partition (size_t n) const |
| Exclusive partition of container in the nth item. | |
| std::pair< Aleph::DynList< T >, Aleph::DynList< T > > | split_half () const |
| Split the container into two halves by alternating elements. | |
| template<class Operation > requires Aleph::InvocablePredicateWith<Operation &, const T &> | |
| std::tuple< Aleph::DynList< T >, Aleph::DynList< T > > | tpartition (Operation &op) const |
| Exclusive partition of container according to a filter criterion. | |
| template<class Operation > requires Aleph::InvocablePredicateWith<Operation &, const T &> | |
| std::tuple< Aleph::DynList< T >, Aleph::DynList< T > > | tpartition (Operation &&op) const |
| Overload of tpartition() that accepts rvalues. | |
| size_t | length () const noexcept(Aleph::dry_detail::const_traversal_is_noexcept< Container, T >) |
| Count the number of elements of a container. | |
| Aleph::DynList< T > | rev () const |
| Return a list with the elements of container in reverse order respect to its traversal order. | |
| Aleph::DynList< T > | take (const size_t n) const |
| Return a list with the first n elements seen in the container during its traversal. | |
| Aleph::DynList< T > | take (size_t i, const size_t j, const size_t step=1) const |
Return a list with the elements at positions i, i + step, i + 2 step, ... that are not greater than j, respect to the traversal order. | |
| Aleph::DynList< T > | drop (const size_t n) const |
| Drop the first n elements seen in the container during its traversal. | |
| template<class Operation > requires Aleph::InvocablePredicateWith<Operation &, const T &> | |
| Aleph::DynList< T > | take_while (Operation &op) const |
| The longest prefix of elements that satisfy a criterion. | |
| template<class Operation > requires Aleph::InvocablePredicateWith<Operation &, const T &> | |
| Aleph::DynList< T > | take_while (Operation &&op) const |
| Overload of take_while() that accepts rvalues. | |
| template<class Operation > requires Aleph::InvocablePredicateWith<Operation &, const T &> | |
| Aleph::DynList< T > | drop_while (Operation &op) const |
| The elements after the longest prefix that satisfies a criterion. | |
| template<class Operation > requires Aleph::InvocablePredicateWith<Operation &, const T &> | |
| Aleph::DynList< T > | drop_while (Operation &&op) const |
| Overload of drop_while() that accepts rvalues. | |
| template<class C = Container> requires requires (C & c) { c.remove(); } | |
| void | mutable_drop (const size_t n) |
| Drop the first n elements seen from container. | |
Public Member Functions inherited from GenericItems< Container, T > | |
| Aleph::DynList< T > | items () const |
| Return a list of all the elements of a container sorted by traversal order. | |
| Aleph::DynList< T > | keys () const |
See items(). | |
Public Member Functions inherited from EqualSequenceMethod< Container > | |
| bool | equal_to (const Container &r) const |
Equality test between this and r. | |
Public Member Functions inherited from StlAlephIterator< SetName > | |
| iterator | begin () noexcept |
| Return an STL-compatible iterator to the first element. | |
| iterator | end () noexcept |
| Return an STL-compatible end iterator. | |
| const_iterator | begin () const noexcept |
| Return a const iterator to the first element. | |
| const_iterator | end () const noexcept |
| Return a const end iterator. | |
| const_iterator | cbegin () const noexcept |
| Return a const iterator to the first element. | |
| const_iterator | cend () const noexcept |
| Return a const end iterator. | |
Private Member Functions | |
| T & | _insert (Dnode< T > *p) noexcept |
| T & | _append (Dnode< T > *p) noexcept |
| void | _insert (DynDlist< T > &list) noexcept |
| void | _append (DynDlist< T > &list) noexcept |
| template<bool First> | |
| void | delete_end () noexcept |
| template<bool First> | |
| T | remove_end_ne () noexcept(std::is_nothrow_move_constructible_v< T >) |
Private Attributes | |
| size_t | num_elem = 0 |
Additional Inherited Members | |
Static Public Member Functions inherited from Aleph::Dnode< T > | |
| static Dnode * | data_to_node (T &data) noexcept |
Given an reference to the data in the node, returns a pointer to the Dnode object that contains it. | |
Static Public Member Functions inherited from FunctionalMethods< Container, T > | |
| template<typename... Items> requires ((std::convertible_to<Items &&, T> and ...) and (Aleph::AppendableWith<typename Aleph::concepts_detail::defer<Container, std::tuple<Items...>>::type, Item_Arg<Items>> and ...)) | |
| static Container | build (Items &&... items) |
| Build a container that holds the given items. | |
| template<class D , typename... Items> requires (std::derived_from<D, typename Aleph::concepts_detail::defer<Container, D>::type> and std::default_initializable<D> and (std::convertible_to<Items &&, T> and ...) and (Aleph::AppendableWith<typename Aleph::concepts_detail::defer<Container, std::tuple<D, Items...>>::type, Item_Arg<Items>> and ...)) | |
| static D | build_as (Items &&... items) |
Build a D, a class derived from the container, holding the given items. | |
Public Attributes inherited from FunctionalMethods< Container, T > | |
| template<typename... Args> requires (typename Aleph::concepts_detail::defer<Container, std::tuple<Args...>>::type & c, T && x) | |
| and { c.append(std::move(x)) | |
| Insert a new element into the container by constructing it from the given args. | |
| template<typename R = void, class Prop , class Operation > requires (Aleph::DynList<Aleph::dry_detail::map_result_t<R, Operation &, T>> & l, Operation & op, const T & item) | |
| and Aleph::InvocableWith< Operation &, const T & > | and { l.append(std::invoke(op, item)) |
| Conditional mapping of the elements of the container. | |
Protected Attributes inherited from Aleph::Dlink | |
| Dlink * | prev |
| Dlink * | next |
Dynamic doubly linked list with O(1) size and bidirectional access.
DynDlist<T> is a doubly linked circular list that maintains a count of elements, enabling O(1) size queries. Unlike DynList (singly linked), DynDlist supports efficient operations at both ends and bidirectional iteration.
This container combines the flexibility of linked lists with a rich set of functional programming operations inherited from FunctionalMethods.
| T | The type of elements stored in the list (default: int). |
Definition at line 117 of file tpl_dynDlist.H.
| using Aleph::DynDlist< T >::Const_Iterator = Aleph::Const_Iterator<Iterator> |
Read-only iterator: the iterator of a constant container.
Definition at line 850 of file tpl_dynDlist.H.
| using Aleph::DynDlist< T >::Item_Type = T |
The type of element that stores the container.
Definition at line 133 of file tpl_dynDlist.H.
| using Aleph::DynDlist< T >::Key_Type = T |
The type of element that stores the container.
Definition at line 136 of file tpl_dynDlist.H.
| using Aleph::DynDlist< T >::Set_Type = DynDlist |
The type of container.
Definition at line 130 of file tpl_dynDlist.H.
|
default |
|
inline |
Definition at line 156 of file tpl_dynDlist.H.
|
inline |
Definition at line 156 of file tpl_dynDlist.H.
|
inline |
Definition at line 156 of file tpl_dynDlist.H.
|
inline |
Destructor.
Definition at line 186 of file tpl_dynDlist.H.
References Aleph::DynDlist< T >::empty().
|
inline |
Copy constructor; all items of list are copied.
The construction time is proportional to the number of items of list
| [in] | list | to be copied |
| bad_alloc | if there is no enough memory |
Definition at line 881 of file tpl_dynDlist.H.
References Aleph::DynDlist< T >::append(), Aleph::Dlink::Iterator::has_curr(), and Aleph::Dlink::is_empty().
|
inlinenoexcept |
Move constructor: takes in constant time the items of list, which is left empty.
The header node of a list holds an item. This is the constructor for a T whose default construction cannot throw: the item of the new header node is built so.
| [in,out] | list | the list to move from. |
Definition at line 898 of file tpl_dynDlist.H.
References Aleph::DynDlist< T >::swap().
|
inlinenoexcept |
Move constructor for a T whose default construction may throw, as one that allocates, and that can be moved: takes in constant time the items of list, which is left empty.
The header node of the new list takes the place of that of list, and its item by a move, so that no item is built.
| [in,out] | list | the list to move from. |
| what | the move constructor of T throws, for the item of the header node; nothing when it is noexcept. Then list keeps its items. |
Definition at line 917 of file tpl_dynDlist.H.
|
inline |
Move constructor for a T whose default construction may throw and that cannot be moved, as one whose move constructor is deleted: takes in constant time the items of list, which is left empty.
The item of the header node cannot be taken from that of list, so it is built by default.
| [in,out] | list | the list to move from. |
| what | the default construction of T throws, for the item of the header node. Then list keeps its items. |
Definition at line 937 of file tpl_dynDlist.H.
References Aleph::DynDlist< T >::swap().
|
inlineprivatenoexcept |
Definition at line 199 of file tpl_dynDlist.H.
References Aleph::Dlink::append(), and Aleph::DynDlist< T >::num_elem.
Referenced by Aleph::DynDlist< T >::append(), Aleph::DynDlist< T >::append(), Aleph::DynDlist< T >::append(), and Aleph::DynDlist< T >::append().
|
inlineprivatenoexcept |
Definition at line 261 of file tpl_dynDlist.H.
References Aleph::Dlink::append_list(), and Aleph::DynDlist< T >::num_elem.
|
inlineprivatenoexcept |
Definition at line 192 of file tpl_dynDlist.H.
References Aleph::Dlink::insert(), and Aleph::DynDlist< T >::num_elem.
Referenced by Aleph::DynDlist< T >::insert(), Aleph::DynDlist< T >::insert(), Aleph::DynDlist< T >::insert(), and Aleph::DynDlist< T >::insert().
|
inlineprivatenoexcept |
Definition at line 252 of file tpl_dynDlist.H.
References Aleph::Dlink::insert_list(), and Aleph::DynDlist< T >::num_elem.
|
inline |
Append all the elements of list after this.
| [in] | list | to insert after this |
Definition at line 291 of file tpl_dynDlist.H.
References Aleph::DynDlist< T >::_append(), and l.
|
inline |
Append a copied item at the end of the list.
| [in] | item | to be copied and appended at the end of the list |
| bad_alloc | if there is no memory for the new item. |
Definition at line 235 of file tpl_dynDlist.H.
References Aleph::DynDlist< T >::_append().
Referenced by Aleph::DynDlist< T >::DynDlist(), Aleph::blossom_weighted_detail::mwmatching::impl::MatchingContext< WeightType >::augment_blossom_rec(), Aleph::Compute_Cut_Nodes< GT, SA >::compute_blocks(), Aleph::compute_maximum_cardinality_bipartite_matching(), Aleph::compute_maximum_cardinality_general_matching(), Aleph::compute_maximum_weight_general_matching(), Aleph::compute_min_cut(), Aleph::compute_nodes_in_level_helper(), Aleph::Compute_Cut_Nodes< GT, SA >::cut_nodes(), Aleph::Compute_Cut_Nodes< GT, SA >::cut_nodes(), demo_bfs_topological_sort(), demo_dynlist(), Aleph::dynarray_to_DynDlist(), Aleph::dynlist_to_DynDlist(), Aleph::edge_connectivity(), Aleph::hopcroft_karp_matching(), Aleph::init_to_DynDlist(), Aleph::Compute_Cut_Nodes< GT, SA >::map_cut_graph(), Aleph::Net_Sup_Dem_Graph< NodeT, ArcT >::non_feasible_nodes(), Aleph::HalfPlaneIntersection::operator()(), Aleph::Tarjan_Connected_Components< GT, Itor, SA >::operator()(), Aleph::DynDlist< T >::operator=(), orden_ejecucion(), Eepic_Plane::put(), Aleph::DynDlist< T >::put(), Aleph::DynDlist< T >::put(), DynDlistSortTest::SetUp(), Aleph::split(), 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(), 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(), to_dyndlist(), Aleph::blossom_weighted_detail::mwmatching::impl::MatchingContext< WeightType >::trace_alternating_paths(), Aleph::vector_to_DynDlist(), Aleph::vector_to_DynDlist(), and Aleph::vertex_connectivity().
|
inlinenoexcept |
See append(const DynDlist & list).
Definition at line 298 of file tpl_dynDlist.H.
References Aleph::DynDlist< T >::_append().
|
inline |
Append a moved item at the end of the list.
| [in] | item | to be moved and appended at the end of the list |
| bad_alloc | if there is no memory for the new element. |
Definition at line 246 of file tpl_dynDlist.H.
References Aleph::DynDlist< T >::_append().
|
inlinenoexcept |
@brief Empties the container.
This is an alias of empty().
| none |
Definition at line 181 of file tpl_dynDlist.H.
References Aleph::DynDlist< T >::empty().
|
inlineprivatenoexcept |
Definition at line 362 of file tpl_dynDlist.H.
References Aleph::DynDlist< T >::num_elem, Aleph::Dnode< T >::remove_next(), and Aleph::Dnode< T >::remove_prev().
|
inlinenoexcept |
@brief Empties the container.
Removes all elements from the list, leaving it empty. This operation is performed in O(n) time, where n is the number of elements in the list.
| none | Empty the list |
Definition at line 166 of file tpl_dynDlist.H.
References Aleph::Dlink::is_empty(), and Aleph::Dnode< T >::remove_next().
Referenced by Aleph::DynDlist< T >::~DynDlist(), Aleph::DynDlist< T >::clear(), Aleph::compute_maximum_cardinality_general_matching(), Aleph::compute_maximum_weight_general_matching(), Aleph::compute_min_cut(), Aleph::compute_minimum_cost_perfect_general_matching(), Aleph::Compute_Cut_Nodes< GT, SA >::cut_nodes(), Aleph::DynDlist< T >::operator=(), TEST(), TEST_F(), and to_dyndlist().
|
inlinenoexcept |
See remove(T & data).
Definition at line 543 of file tpl_dynDlist.H.
References Aleph::Dnode< T >::data, and Aleph::DynDlist< T >::remove().
Referenced by TEST().
|
inline |
If this was treated as a queue, the it returns the most oldlest inserted item.
Definition at line 485 of file tpl_dynDlist.H.
References Aleph::DynDlist< T >::get_first().
Referenced by TEST().
|
inline |
See remove_first().
Definition at line 471 of file tpl_dynDlist.H.
References Aleph::DynDlist< T >::remove_first().
Referenced by Aleph::compute_bipartite(), TEST(), and Aleph::vertex_connectivity().
|
inline |
Return a modifiable reference to first item in the list.
Definition at line 330 of file tpl_dynDlist.H.
References ah_underflow_error_if, Aleph::DynDlist< T >::get_first_ne(), and Aleph::Dlink::is_empty().
Referenced by Aleph::blossom_weighted_detail::mwmatching::impl::MatchingContext< WeightType >::add_s_to_s_edge(), Aleph::blossom_weighted_detail::mwmatching::impl::MatchingContext< WeightType >::augment_matching(), Aleph::DynDlist< T >::front(), main(), Aleph::HalfPlaneIntersection::operator()(), orden_ejecucion(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST_F(), TEST_F(), Aleph::DynDlist< T >::top(), Aleph::DynDlist< T >::top(), and Aleph::blossom_weighted_detail::mwmatching::impl::MatchingContext< WeightType >::trace_alternating_paths().
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. A reference to const.
Definition at line 338 of file tpl_dynDlist.H.
References ah_underflow_error_if, Aleph::DynDlist< T >::get_first_ne(), and Aleph::Dlink::is_empty().
|
inlinenoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. A reference to const.
Definition at line 311 of file tpl_dynDlist.H.
References Aleph::Dnode< T >::get_next().
|
inlinenoexcept |
Return a modifiable reference to first item in the list.
Definition at line 304 of file tpl_dynDlist.H.
References Aleph::Dnode< T >::get_next().
Referenced by Aleph::DynDlist< T >::get_first(), Aleph::DynDlist< T >::get_first(), and Aleph::DynDlist< T >::remove_end_ne().
|
inline |
Return a modifiable reference to last item in the list.
Definition at line 345 of file tpl_dynDlist.H.
References ah_underflow_error_if, Aleph::DynDlist< T >::get_last_ne(), and Aleph::Dlink::is_empty().
Referenced by Aleph::blossom_weighted_detail::mwmatching::impl::MatchingContext< WeightType >::add_s_to_s_edge(), Aleph::blossom_weighted_detail::mwmatching::impl::MatchingContext< WeightType >::augment_matching(), Aleph::HalfPlaneIntersection::operator()(), Aleph::DynDlist< T >::rear(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), and Aleph::blossom_weighted_detail::mwmatching::impl::MatchingContext< WeightType >::trace_alternating_paths().
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. A reference to const.
Definition at line 353 of file tpl_dynDlist.H.
References ah_underflow_error_if, Aleph::DynDlist< T >::get_last_ne(), and Aleph::Dlink::is_empty().
|
inlinenoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. A reference to const.
Definition at line 324 of file tpl_dynDlist.H.
References Aleph::Dnode< T >::get_prev().
|
inlinenoexcept |
Return a modifiable reference to last item in the list.
Definition at line 317 of file tpl_dynDlist.H.
References Aleph::Dnode< T >::get_prev().
Referenced by Aleph::DynDlist< T >::get_last(), Aleph::DynDlist< T >::get_last(), and Aleph::DynDlist< T >::remove_end_ne().
|
inline |
Insert all the elements of list before this.
| [in] | list | insert before this. |
Definition at line 275 of file tpl_dynDlist.H.
References Aleph::DynDlist< T >::_insert(), and l.
|
inline |
Insert a copy of item at the beginning of the list.
| [in] | item | to be copied and inserted at the beginning |
| bad_alloc | if there is no enough memory |
Definition at line 213 of file tpl_dynDlist.H.
References Aleph::DynDlist< T >::_insert().
Referenced by main(), main(), Aleph::DynDlist< T >::push(), Aleph::DynDlist< T >::push(), Aleph::DynDlist< T >::reverse(), TEST(), TEST(), TEST(), TEST_F(), and Aleph::blossom_weighted_detail::mwmatching::impl::MatchingContext< WeightType >::trace_alternating_paths().
|
inlinenoexcept |
See insert(const DynDlist & list).
Definition at line 282 of file tpl_dynDlist.H.
References Aleph::DynDlist< T >::_insert().
|
inline |
Insert a moved item at the beginning of the list.
| [in] | item | to be moved and inserted at the beginning of the list |
| bad_alloc | if there is no enough memory |
Definition at line 224 of file tpl_dynDlist.H.
References Aleph::DynDlist< T >::_insert().
|
inline |
Assignment by copy.
In this assignment this is emptied and the the items of list are copied to this. It takes since time proportional to the size of list more the old size of this
| [in] | list | to be copied |
| bad_alloc | if there is no enough memory |
Definition at line 861 of file tpl_dynDlist.H.
References Aleph::DynDlist< T >::append(), Aleph::DynDlist< T >::empty(), and Aleph::Dlink::Iterator::has_curr().
|
inlinenoexcept |
Assignment by moving.
In this assignment this is swapped with list. So, this takes constant time independently of list sizes.
| [in] | list | to be assigned by moving |
| bad_alloc | if there is no enough memory |
Definition at line 953 of file tpl_dynDlist.H.
References Aleph::DynDlist< T >::swap().
|
inline |
Return a modifiable reference to the i-th item of the list.
| out_of_range | if n is greater than or equal to the list size. |
Definition at line 961 of file tpl_dynDlist.H.
References ah_out_of_range_error_if, and LocateFunctions< Container, Type >::get_it().
|
inline |
Return a reference to const to the i-th item of the list.
| out_of_range | if n is greater than or equal to the list size. |
Definition at line 974 of file tpl_dynDlist.H.
References ah_out_of_range_error_if, and LocateFunctions< Container, Type >::get_it().
|
inline |
See remove_first().
Definition at line 503 of file tpl_dynDlist.H.
References Aleph::DynDlist< T >::remove_first().
Referenced by TEST().
|
inline |
See insert(const T & item).
Definition at line 491 of file tpl_dynDlist.H.
References Aleph::DynDlist< T >::insert().
Referenced by TEST().
|
inline |
See insert(T && item).
Definition at line 497 of file tpl_dynDlist.H.
References Aleph::DynDlist< T >::insert().
|
inline |
See append(const T & item).
Definition at line 459 of file tpl_dynDlist.H.
References Aleph::DynDlist< T >::append().
Referenced by Aleph::compute_bipartite(), and TEST().
|
inline |
See append(T && item).
Definition at line 465 of file tpl_dynDlist.H.
References Aleph::DynDlist< T >::append().
|
inline |
If this was treated as a queue, the it returns the most recently inserted item.
Definition at line 478 of file tpl_dynDlist.H.
References Aleph::DynDlist< T >::get_last().
Referenced by TEST().
|
inlinenoexcept |
Assuming that data is a reference to the item in the list, it removes the item.
This method can be more powerful given that allows to remove any item in constant time given a valid reference to it.
| [in] | data | valid reference to the item in the list. |
Definition at line 534 of file tpl_dynDlist.H.
References Aleph::Dnode< T >::data, Aleph::Dnode< T >::data_to_node(), Aleph::Dlink::del(), and Aleph::DynDlist< T >::num_elem.
Referenced by Aleph::DynDlist< T >::erase(), and TEST().
|
inlineprivatenoexcept |
Definition at line 376 of file tpl_dynDlist.H.
References Aleph::DynDlist< T >::get_first_ne(), and Aleph::DynDlist< T >::get_last_ne().
|
inline |
Remove the first item of the list; return a copy of removed item.
| underflow_error | if this is empty |
Definition at line 441 of file tpl_dynDlist.H.
References ah_underflow_error_if, Aleph::Dlink::is_empty(), and Aleph::DynDlist< T >::remove_first_ne().
Referenced by demo_dynlist(), Aleph::DynDlist< T >::get(), Aleph::HalfPlaneIntersection::operator()(), Aleph::DynDlist< T >::pop(), TEST(), TEST(), TEST(), TEST(), and Aleph::blossom_weighted_detail::mwmatching::impl::MatchingContext< WeightType >::trace_alternating_paths().
|
inlinenoexcept |
Remove the first item of the list, which must not be empty.
The item moves out before its node leaves, so that if its move throws the list keeps it.
Definition at line 419 of file tpl_dynDlist.H.
Referenced by Eepic_Plane::~Eepic_Plane(), Aleph::DynDlist< T >::remove_first(), TEST(), TEST(), and TEST().
|
inline |
Remove the last item of the list; return a copy of removed item.
| underflow_error | if this is empty |
Definition at line 452 of file tpl_dynDlist.H.
References ah_underflow_error_if, Aleph::Dlink::is_empty(), and Aleph::DynDlist< T >::remove_last_ne().
Referenced by demo_dynlist(), Aleph::HalfPlaneIntersection::operator()(), TEST(), TEST(), and Aleph::blossom_weighted_detail::mwmatching::impl::MatchingContext< WeightType >::trace_alternating_paths().
|
inlinenoexcept |
Remove the last item of the list, which must not be empty.
The item moves out before its node leaves, so that if its move throws the list keeps it.
Definition at line 431 of file tpl_dynDlist.H.
Referenced by Aleph::DynDlist< T >::remove_last(), TEST(), TEST(), and TEST().
|
inline |
Definition at line 1008 of file tpl_dynDlist.H.
References Aleph::DynDlist< T >::reverse().
|
inlinenoexcept |
Definition at line 991 of file tpl_dynDlist.H.
References Aleph::DynDlist< T >::reverse().
Referenced by TEST_F().
|
inline |
Return a reversed copy of this
Definition at line 1000 of file tpl_dynDlist.H.
References LocateFunctions< Container, Type >::get_it(), and Aleph::DynDlist< T >::insert().
|
inlinenoexcept |
Definition at line 985 of file tpl_dynDlist.H.
References Aleph::Dlink::reverse().
Referenced by Aleph::DynDlist< T >::rev(), Aleph::DynDlist< T >::rev(), TEST_F(), and TEST_F().
|
inlinenoexcept |
Return the number of elements (constant time)
Definition at line 139 of file tpl_dynDlist.H.
References Aleph::DynDlist< T >::num_elem.
Referenced by Aleph::blossom_weighted_detail::mwmatching::impl::MatchingContext< WeightType >::augment_matching(), Aleph::sort_utils_detail::counting_sort_impl(), Eepic_Plane::draw(), Aleph::load_digraph(), Aleph::blossom_weighted_detail::mwmatching::impl::MatchingContext< WeightType >::make_blossom(), Aleph::HalfPlaneIntersection::operator()(), print_matching(), Aleph::sort_utils_detail::radix_sort_impl(), 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(), 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(), Aleph::blossom_weighted_detail::mwmatching::impl::MatchingContext< WeightType >::trace_alternating_paths(), TYPED_TEST(), TYPED_TEST(), TYPED_TEST(), TYPED_TEST(), TYPED_TEST(), TYPED_TEST(), TYPED_TEST(), TYPED_TEST(), TYPED_TEST(), TYPED_TEST(), TYPED_TEST(), TYPED_TEST(), TYPED_TEST(), TYPED_TEST(), and TYPED_TEST().
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Alias for split_list.
See split_list for parameter documentation.
Definition at line 596 of file tpl_dynDlist.H.
References l, r, and Aleph::DynDlist< T >::split_list().
Referenced by TEST().
|
inline |
Split the list in two.
This method takes the first n - n / 2 items of this and puts them, in the same order, in list l. The remainder items are put in list r. After operation this becomes empty. The order of items is preserved through l and r.
| [out] | l | list containing the first n - n / 2 items (must be empty) |
| [out] | r | list containing the last n / 2 items (must be empty) |
| domain_error | if any of the lists is not empty |
Definition at line 588 of file tpl_dynDlist.H.
References ah_domain_error_if, Aleph::HTList::is_empty(), l, r, and Aleph::DynDlist< T >::split_list_ne().
Referenced by Aleph::DynDlist< T >::split().
|
inlinenoexcept |
Split the list in two.
This method takes the first n - n / 2 items of this and puts them, in the same order, in list l. The remainder items are put in list r. After operation this becomes empty. The order of items is preserved through l and r. The sizes of l and r follow from the number of items, without counting them.
| [out] | l | list containing the first n - n / 2 items (must be empty) |
| [out] | r | list containing the last n / 2 items (must be empty) |
Definition at line 568 of file tpl_dynDlist.H.
References l, Aleph::DynDlist< T >::num_elem, r, and Aleph::Dlink::split_list().
Referenced by Aleph::DynDlist< T >::split_list(), and TEST().
|
inlinenoexcept |
Swap in constant time all the items of this with all the items of l (very fast!)
Definition at line 550 of file tpl_dynDlist.H.
References l, Aleph::DynDlist< T >::num_elem, and Aleph::Dlink::swap().
Referenced by Aleph::DynDlist< T >::DynDlist(), Aleph::DynDlist< T >::DynDlist(), Aleph::DynDlist< T >::operator=(), and TEST_F().
|
inline |
See get_first().
Definition at line 509 of file tpl_dynDlist.H.
References Aleph::DynDlist< T >::get_first().
Referenced by TEST().
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. A reference to const.
Definition at line 516 of file tpl_dynDlist.H.
References Aleph::DynDlist< T >::get_first().
|
private |
Definition at line 126 of file tpl_dynDlist.H.
Referenced by Aleph::DynDlist< T >::_append(), Aleph::DynDlist< T >::_append(), Aleph::DynDlist< T >::_insert(), Aleph::DynDlist< T >::_insert(), Aleph::DynDlist< T >::Iterator::append(), Aleph::DynDlist< T >::Iterator::append(), Aleph::DynDlist< T >::Iterator::append_list(), Aleph::DynDlist< T >::Iterator::del(), Aleph::DynDlist< T >::delete_end(), Aleph::DynDlist< T >::Iterator::insert(), Aleph::DynDlist< T >::Iterator::insert(), Aleph::DynDlist< T >::Iterator::insert_list(), Aleph::DynDlist< T >::remove(), Aleph::DynDlist< T >::Iterator::reset_last(), Aleph::DynDlist< T >::size(), Aleph::DynDlist< T >::split_list_ne(), and Aleph::DynDlist< T >::swap().