|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Dynamic singly linked list with functional programming support. More...
#include <htlist.H>
Classes | |
| class | Iterator |
| Iterator on the items of list. More... | |
Public Types | |
| using | Item_Type = T |
| using | Key_Type = T |
Public Types inherited from StlAlephIterator< SetName > | |
| using | iterator = StlIterator< SetName > |
| using | const_iterator = StlConstIterator< SetName > |
Public Member Functions | |
| Slinknc * | get_head () const noexcept=delete |
| Slinknc * | get_tail () const noexcept=delete |
| DynList & | swap (DynList &l) noexcept |
| DynList () | |
| Initialize an empty list. | |
| DynList (const DynList &l) | |
Initialize a list with a copy of all the items of list l | |
| T & | insert (const T &item) |
| T & | insert (T &&item) |
| Insert a new item by movement. | |
| T & | push (const T &item) |
| T & | push (T &&item) |
| T & | put (const T &item) |
| T & | put (T &&item) |
| T & | append (const T &item) |
| T & | append (T &&item) |
| T | remove_ne () noexcept |
| Remove the first item of the list without exception. | |
| T | remove () |
| Remove the first item of the list. | |
| T | remove_first_ne () noexcept |
| T | remove_first () |
| T | pop () |
| T | get () |
| T & | get_last_ne () const noexcept |
| Return the last item of the list without exception. | |
| T & | get_first_ne () const noexcept |
| Return the first item of the list without exception. | |
| T & | get_last () const |
| Return the last item of the list. | |
| T & | get_first () const |
| Return the first item of the list. | |
| T & | top () const |
| void | empty () noexcept |
| empty the list | |
| void | clear () noexcept |
| Empties the container. | |
| ~DynList () | |
| DynList & | reverse () noexcept |
| DynList & | rev () noexcept |
| DynList | reverse () const |
Return a reversed copy of this. | |
| DynList | rev () const |
| template<class Equal = std::equal_to<T>> | |
| T | remove_ne (Equal eq) noexcept |
| template<class Equal = std::equal_to<T>> | |
| T | remove (Equal eq) |
| Remove the first element matching an equality criteria. | |
| DynList (DynList &&l) noexcept | |
Initialize the list with all the items of l moved to this. | |
| DynList & | operator= (const DynList &l) |
Assign to this a copy of l | |
| DynList & | operator= (DynList &&l) noexcept |
Assign to this by movement the list l | |
| DynList & | append (DynList &&list) noexcept |
Append listat the end of this by movement. | |
| DynList & | insert (DynList &&list) noexcept |
Insert listat the beginning of this by movement. | |
| DynList & | append (const DynList &list) |
Append to this a copy of list. | |
| DynList & | insert (const DynList &list) |
Insert to this a copy of list. | |
| T & | get (const size_t i) |
Obtains a modifiable reference to the i-th item of this. | |
| T & | operator[] (const size_t &i) |
Array-style access to the i-th item. Equivalent to get(i). | |
Public Member Functions inherited from Aleph::HTList | |
| HTList () noexcept | |
| void | reset () noexcept |
| constexpr bool | is_empty () const noexcept |
| bool | is_unitarian () const noexcept |
| Return true if the list contains exactly just one. | |
| bool | is_unitarian_or_empty () const noexcept |
| Return true if list contains one element or is empty. | |
| Slinknc * | get_head () const noexcept |
| Slinknc * | get_tail () const noexcept |
| Slinknc * | get_first () const noexcept |
| Slinknc * | get_last () const noexcept |
Return the last item of the list (nullptr if the list is empty) | |
| HTList & | swap (HTList &l) noexcept |
| void | insert (Slinknc *link) noexcept |
| void | append (Slinknc *link) noexcept |
| void | append (HTList &l) noexcept |
| void | put (Slinknc *link) noexcept |
| void | concat (HTList &l) noexcept |
| Concat to 'this' all 'l' list; 'l' becomes empty. | |
| void | concat_list (HTList &l) noexcept |
| void | insert (HTList &l) noexcept |
| Insert starting in link (contained in 'this' list) the. | |
| void | insert (Slinknc *link, HTList &list) noexcept |
Insert a list into this after one of its items. | |
| Slinknc * | remove_head_ne () noexcept |
| It deletes head element (first one). Return deleted. | |
| Slinknc * | remove_head () |
| Slinknc * | remove_first_ne () noexcept |
| Slinknc * | remove_first () |
| bool | remove (Slinknc *link) |
| void | push (Slinknc *link) noexcept |
| Slinknc * | pop () |
| Slinknc * | top () const |
| size_t | split_list (HTList &l, HTList &r) noexcept |
| It divides 'this' into two equal lists without modifying. | |
| size_t | split_list_ne (HTList &l, HTList &r) noexcept |
| size_t | split (HTList &l, HTList &r) noexcept |
| size_t | reverse () noexcept |
| It inverts all list elements. It returns list size. | |
| size_t | reverse_list () noexcept |
| void | cut (Slinknc *link, HTList &list) noexcept |
| It cuts 'this' over 'link' element and it puts all. | |
| void | cut_list (Slinknc *link, HTList &list) noexcept |
| void | remove_all_and_delete () noexcept |
| size_t | size () const noexcept |
| Count the number of elements of the list. | |
| void | rotate_left (size_t n) |
| Rotate to left the list n positions. | |
Public Member Functions inherited from GenericTraverse< Container > | |
| template<class Operation > | |
| bool | traverse (Operation &operation) noexcept(traverse_is_noexcept< Operation >()) |
| Traverse the container via its iterator and performs a conditioned operation on each item. | |
| template<class Operation > | |
| bool | traverse (Operation &operation) const noexcept(traverse_is_noexcept< Operation >()) |
Const overload of traverse(Operation&). | |
| template<class Operation > | |
| bool | traverse (Operation &&operation) const noexcept(traverse_is_noexcept< Operation >()) |
Overload of traverse(Operation&) const that accepts rvalues. | |
| template<class Operation > | |
| bool | traverse (Operation &&operation) noexcept(traverse_is_noexcept< Operation >()) |
Overload of traverse(Operation&) that accepts rvalues. | |
Public Member Functions inherited from LocateFunctions< Container, Type > | |
| auto | get_it () const |
| Return a properly initialized iterator positioned at the first item on the container. | |
| auto | get_it (const size_t pos) const |
Return a properly initialized iterator positioned at the pos item on the container. | |
| auto | get_itor () const |
Alias of get_it(). | |
| Type & | nth_ne (const size_t n) noexcept |
| Return the n‑th element without bounds checking. | |
| const Type & | nth_ne (const size_t n) const noexcept |
Const overload of nth_ne(size_t). | |
| 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 > | |
| Type * | find_ptr (Operation &operation) noexcept(operation_is_noexcept< Operation >()) |
| Find a pointer to an item in the container according to a searching criterion. | |
| template<class Operation > | |
| const Type * | find_ptr (Operation &operation) const noexcept(operation_is_noexcept< Operation >()) |
Const overload of find_ptr(Operation&). | |
| template<class Operation > | |
| const Type * | find_ptr (Operation &&operation) const noexcept(operation_is_noexcept< Operation >()) |
| Overload of find_ptr() const that accepts rvalues. | |
| template<class Operation > | |
| Type * | find_ptr (Operation &&operation) noexcept(operation_is_noexcept< Operation >()) |
| Overload of find_ptr() that accepts rvalues. | |
| template<class Operation > | |
| size_t | find_index (Operation &operation) const noexcept(operation_is_noexcept< Operation >()) |
| Find the position of an item in the container according to a searching criterion. | |
| template<class Operation > | |
| size_t | find_index (Operation &&operation) const noexcept(operation_is_noexcept< Operation >()) |
| Overload of find_index() that accepts rvalues. | |
| template<class Operation > | |
| std::tuple< bool, Type > | find_item (Operation &operation) noexcept(operation_is_noexcept< Operation >()) |
| Safe sequential searching of an item matching a criterion. | |
| template<class Operation > | |
| std::tuple< bool, Type > | find_item (Operation &operation) const noexcept(operation_is_noexcept< Operation >()) |
| template<class Operation > | |
| std::tuple< bool, Type > | find_item (Operation &&operation) noexcept(operation_is_noexcept< Operation >()) |
| Overload of find_item() that accepts rvalues. | |
| template<class Operation > | |
| std::tuple< bool, Type > | find_item (Operation &&operation) const noexcept(operation_is_noexcept< Operation >()) |
| Overload of find_item() const that accepts rvalues. | |
| template<class Operation > | |
| bool | contains_if (Operation &&operation) const noexcept(operation_is_noexcept< Operation >()) |
| Test if an item satisfying a criterion is present in the container. | |
| bool | contains (const Type &item) const |
| Test if an item is present in the container using equality. | |
Public Member Functions inherited from SpecialCtors< Container, T > | |
| SpecialCtors ()=default | |
| SpecialCtors (const SpecialCtors &)=default | |
| SpecialCtors (SpecialCtors &&) noexcept | |
| SpecialCtors & | operator= (const SpecialCtors &)=default |
| SpecialCtors & | operator= (SpecialCtors &&) noexcept |
| SpecialCtors (const Aleph::DynList< T > &l) | |
Build the container by inserting all items of the list l. | |
| template<class 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 FunctionalMethods< Container, T > | |
| template<typename ... Args> | |
| void | emplace (Args &&... args) |
| Appends a new element into the container by constructing it in-place with the given args. | |
| template<typename ... Args> | |
| void | emplace_end (Args &&... args) |
| template<typename ... Args> | |
| void | emplace_ins (Args &&... args) |
| Insert a new element into the container by constructing it in-place with the given args. | |
| template<typename ... Args> | |
| size_t | ninsert (Args ... args) |
| Insert n variadic items. | |
| template<typename ... Args> | |
| size_t | nappend (Args ... args) |
| Append n variadic items. | |
| template<class Operation > | |
| void | for_each (Operation &operation) |
| Traverse all the container and performs an operation on each element. | |
| template<class Operation > | |
| void | for_each (Operation &operation) const |
Const overload of for_each(Operation&). | |
| template<class Operation > | |
| void | for_each (Operation &&operation) const |
| Overload of for_each() const that accepts rvalues. | |
| template<class Operation > | |
| void | for_each (Operation &&operation) |
| Overload of for_each() that accepts rvalues. | |
| template<class Operation > | |
| void | each (Operation &operation) |
Alias of for_each(Operation&). | |
| template<class Operation > | |
| void | each (Operation &operation) const |
Const alias of for_each(Operation&). | |
| template<class Operation > | |
| void | each (Operation &&operation) const |
| Const alias of each() that accepts rvalues. | |
| template<class Operation > | |
| void | each (Operation &&operation) |
| Alias of each() that accepts rvalues. | |
| template<class Operation > | |
| void | each (size_t pos, const size_t slice, Operation &operation) const |
Traverse the container starting at pos taking one item every slice, performing a mutable operation on each visited element. | |
| template<class Operation > | |
| void | each (const size_t pos, const size_t slice, Operation &&operation) const |
| template<class Operation > | |
| void | mutable_for_each (Operation &operation) |
| Apply a mutable operation to each element of the container. | |
| template<class Operation > | |
| void | mutable_for_each (Operation &&operation) |
| template<class Operation > | |
| bool | all (Operation &operation) const |
| Check if all the elements of the container satisfy a condition. | |
| template<class Operation > | |
| bool | all (Operation &&operation) const |
| Overload of all() that accepts rvalues. | |
| template<class Operation > | |
| bool | exists (Operation &op) const |
| Test for existence in the container of an element satisfying a criterion. | |
| template<class Operation > | |
| bool | exists (Operation &&op) const |
| Overload of exists() that accepts rvalues. | |
| template<typename __T = T, class Operation = Aleph::Dft_Map_Op<T, __T>> | |
| Aleph::DynList< __T > | maps (Operation &op) const |
| Map the elements of the container. | |
| template<typename __T = T, class Operation = Aleph::Dft_Map_Op<__T, __T>> | |
| Aleph::DynList< __T > | maps (Operation &&op) const |
| Overload of maps() that accepts rvalues. | |
| template<typename __T = T, class Prop , class Operation > | |
| Aleph::DynList< __T > | maps_if (Prop prop, Operation &op) const |
| Conditional mapping of the elements of the container. | |
| template<typename __T = T, class Prop , class Operation > | |
| Aleph::DynList< __T > | maps_if (Prop prop, Operation &&op) const |
| Overload of maps_if() 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 __T = T, class Op = Aleph::Dft_Fold_Op<__T, T>> | |
| __T | foldl (const __T &init, Op &op) const |
| Fold the elements of the container to a specific result. | |
| template<typename __T = T, class Op = Aleph::Dft_Fold_Op<__T, T>> | |
| __T | foldl (const __T &init, Op &&op=Op()) const |
| Overload of foldl() that accepts rvalues. | |
| template<typename __T = T, class Op = Aleph::Dft_Fold_Op<__T, T>> | |
| __T | fold_left (const __T &init, Op &op) const |
| Alias for foldl with the same accumulator type. | |
| template<typename __T = T, class Op = Aleph::Dft_Fold_Op<__T, T>> | |
| __T | fold_left (const __T &init, Op &&op=Op()) const |
| Overload of fold_left() that accepts rvalues. | |
| template<class Operation > | |
| 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 > | |
| T | fold (const T &init, Operation &&operation) const |
| Overload of fold() that accepts rvalues. | |
| template<class Operation > | |
| Aleph::DynList< T > | filter (Operation &operation) const |
| Filter the elements of a container according to a matching criterion. | |
| template<class Operation > | |
| Aleph::DynList< T > | filter (Operation &&operation) const |
| Overload of filter() that accepts rvalues. | |
| template<class Operation > | |
| 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 > | |
| Aleph::DynList< const T * > | ptr_filter (Operation &&operation) const |
| Overload of ptr_filter() that accepts rvalues. | |
| template<class Operation > | |
| 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 > | |
| Aleph::DynList< std::tuple< T, size_t > > | pfilter (Operation &&operation) const |
| Overload of pfilter() that accepts rvalues. | |
| template<class Operation > | |
| std::pair< Aleph::DynList< T >, Aleph::DynList< T > > | partition (Operation &op) const |
| Exclusive partition of container according to a filter criterion. | |
| template<class Operation > | |
| 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 > | |
| std::tuple< Aleph::DynList< T >, Aleph::DynList< T > > | tpartition (Operation &op) const |
| Exclusive partition of container according to a filter criterion. | |
| template<class Operation > | |
| std::tuple< Aleph::DynList< T >, Aleph::DynList< T > > | tpartition (Operation &&op) const |
| Overload of tpartition() that accepts rvalues. | |
| size_t | length () const noexcept |
| 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 elements seen in the container between i and j position respect to its traversal. | |
| Aleph::DynList< T > | drop (const size_t n) const |
| Drop the first n elements seen in the container during its traversal. | |
| 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 |
Public Member Functions inherited from EqualSequenceMethod< Container > | |
| bool | equal_to (const Container &r) const |
Equality test between this and r. | |
| bool | operator== (const Container &r) const |
| Equality operator. | |
| bool | operator!= (const Container &r) const |
| Inequality operator. | |
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 Types | |
| using | CtorBase = SpecialCtors< DynList< T >, T > |
Private Member Functions | |
| T & | __insert (Snodenc< T > *p) noexcept |
| T & | __append (Snodenc< T > *p) noexcept |
Additional Inherited Members | |
Related Symbols inherited from FunctionalMethods< Container, T > | |
| each | |
| each | |
| each | |
Dynamic singly linked list with functional programming support.
DynList<T> is a versatile singly linked list that combines efficient list operations with a rich set of functional programming methods inherited from the FunctionalMethods mixin.
This is one of the most commonly used containers in Aleph-w, providing:
| T | The type of elements stored in the list (default: int). |
|
private |
|
inline |
|
inline |
Definition at line 1413 of file htlist.H.
References Aleph::DynList< T >::empty().
Initialize the list with all the items of l moved to this.
This constructor copies (by moving) all the items of list l. Consequently, no copy is done and the construction takes \(O(1)\).
l is a 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 responsibility, if and only if you are absolutely sure that the list will not be needed after.| [in] | l | a rvalue containing a entire list. |
Definition at line 1558 of file htlist.H.
References l, and Aleph::DynList< T >::swap().
|
inlineprivatenoexcept |
Definition at line 1199 of file htlist.H.
References Aleph::HTList::append(), and Aleph::divide_and_conquer_partition_dp().
Referenced by Aleph::DynList< T >::append(), and Aleph::DynList< T >::append().
|
inlineprivatenoexcept |
Definition at line 1190 of file htlist.H.
References Aleph::divide_and_conquer_partition_dp(), and Aleph::HTList::insert().
Referenced by Aleph::DynList< T >::insert(), and Aleph::DynList< T >::insert().
Append to this a copy of list.
This version of append(l) traverses the items of l and appends them (copies) into this.
| [in] | list | list to be copied at the end |
| bad_alloc | if there is no enough memory |
Definition at line 1653 of file htlist.H.
References Aleph::HTList::append(), and Aleph::copy().
Append a new item by copy.
Allocate memory for a new item, copy and append it at the end of the list.
| `bad_alloc` | if there is no enough memory |
Definition at line 1271 of file htlist.H.
References Aleph::DynList< T >::__append().
Referenced by ComplexArray::ComplexArray(), Container< Ctype >::Container(), List_of_25_items::List_of_25_items(), WorkersSet< WorkerFct >::WorkersSet(), Aleph::__compute_cut_nodes(), Aleph::__dfp_phase2_list(), Aleph::Gen_MultiPolynomial< Coefficient, MonomOrder >::_factorize_as_univariate_in_var(), Aleph::arcs(), Aleph::BitArray::bits_list(), Aleph::Gen_Mo_On_Tree_Node< T, Policy >::build(), build_complete_bipartite(), build_complete_graph(), build_cycle(), Aleph::build_feasible_spanning_tree(), DynListSortTest::build_list(), DynDlistSortTest::build_list(), Aleph::build_perms(), build_point_set(), Aleph::Build_Subgraph< GT, SA >::build_subgraph(), Aleph::chromatic_number(), Aleph::VoronoiDiagramFromDelaunay::clipped_cells(), Aleph::VoronoiDiagramFortune::clipped_cells(), GraphCommon< GT, Node, Arc >::collect_arcs_if(), Aleph::complete_rows(), Aleph::k_shortest_paths_detail::compose_candidate(), Aleph::k_shortest_paths_detail::compose_general_candidate(), Aleph::compute_bipartite_all_components(), Aleph::compute_cut_nodes(), Aleph::Lengauer_Tarjan_Dominators< GT, SA >::compute_idom(), Aleph::Lengauer_Tarjan_Post_Dominators< GT, SA >::compute_ipdom(), Aleph::Unconnected_Components< GT, SA >::compute_lists(), Aleph::concat(), Aleph::Tarjan_Connected_Components< GT, Itor, SA >::connected_components(), create_list(), Aleph::decompose_flow(), demo_advanced_algorithms(), demo_build(), demo_convex_hull_cities(), demo_coverage_area(), demo_dynlist(), demo_fold(), demo_performance(), demo_perm_predicates(), demo_permutations(), demo_practical(), demo_sieve_of_eratosthenes(), demo_simple_bloom_filter(), demo_subset_enumeration(), demo_transformation(), demo_transpose(), demo_traverse(), demo_zipping(), Aleph::deque_to_DynList(), Aleph::Gen_Polynomial< Coefficient >::divide_scalar_inplace(), FunctionalMethods< Container, T >::drop(), Aleph::drop_while(), Aleph::dynarray_to_DynList(), Aleph::enumerate_tuple(), Aleph::eppstein_k_shortest_paths(), extract_from_stl_container(), Aleph::Gen_Polynomial< Coefficient >::factor_mod_p(), Aleph::Gen_MultiPolynomial< Coefficient, MonomOrder >::factor_recombination(), Aleph::Gen_MultiPolynomial< Coefficient, MonomOrder >::factorize(), Aleph::Gen_Polynomial< Coefficient >::factorize(), Aleph::Karger_Min_Cut< GT, SA >::fast(), FunctionalMethods< Container, T >::filter(), Aleph::filter_perm(), Aleph::Gen_Interval_Tree< NodeType, T, Compare >::find_all_overlaps(), Aleph::ShortestPathInPolygon::find_sleeve(), Aleph::flat_map(), Aleph::flatten(), Aleph::flatten(), Aleph::flatten(), Aleph::flatten(), Aleph::format_string_csv(), Aleph::gen_seq_list_tuples(), generate_points(), Aleph::Hungarian_Assignment< Cost_Type >::get_assignments(), Aleph::get_curr_list(), Aleph::ZipIterator< C >::get_curr_list(), Aleph::get_futures(), Aleph::Hungarian_Result< Cost_Type >::get_pairs(), Aleph::get_partial_arcs(), get_pre_in_list(), Aleph::get_unitarian_DynList(), Aleph::Bloom_Filter< T >::hash_seeds(), Aleph::Gen_Polynomial< Coefficient >::hensel_lift(), GraphCommon< GT, Node, Arc >::in_arcs(), Aleph::in_arcs(), GraphCommon< GT, Node, Arc >::in_nodes(), Aleph::in_nodes(), Aleph::in_place_transpose(), Aleph::in_place_transpose(), Aleph::inconnected_components(), Aleph::init_to_DynList(), Aleph::HTList::insert(), Aleph::MapOpenHash< Key, Data, Cmp, HashTable >::items_ptr(), Aleph::DynMapTree< Key, Data, Tree, Compare >::items_ptr(), Aleph::DynMapHashTable< Key, Data, HashTable, Cmp >::items_ptr(), QuadTree::join(), Aleph::Karger_Min_Cut< GT, SA >::karger_min_cut(), Aleph::kosaraju_connected_components(), Aleph::kosaraju_connected_components(), Aleph::list_to_DynList(), main(), main(), Aleph::Net_Graph< NodeT, ArcT >::make_super_sink(), Aleph::Net_Graph< NodeT, ArcT >::make_super_source(), Aleph::map_keys_to_DynList(), Aleph::map_perm(), Aleph::map_to_DynList(), Aleph::map_values_to_DynList(), Aleph::maps(), FunctionalMethods< Container, T >::maps(), FunctionalMethods< Container, T >::maps_if(), Aleph::QuickHull::operator()(), Aleph::ConstrainedDelaunayTriangulation::operator()(), Aleph::AdversarialTraceCollector< Move, Score >::operator()(), Aleph::ShortestPathInPolygon::operator()(), Aleph::SearchSolutionCollector< Solution >::operator()(), Aleph::DelaunayTriangulationBowyerWatson::operator()(), Aleph::DelaunayTriangulationRandomizedIncremental::operator()(), Aleph::VoronoiDiagram::operator()(), Aleph::VoronoiDiagramFortune::operator()(), Aleph::ConstrainedDelaunayTriangulation::operator()(), Aleph::Stoer_Wagner_Min_Cut< GT, Distance, SA >::operator()(), Aleph::MonotonePolygonTriangulation::operator()(), Aleph::MinimumEnclosingCircle::operator()(), Aleph::DynList< T >::operator=(), GraphCommon< GT, Node, Arc >::out_arcs(), Aleph::out_arcs(), GraphCommon< GT, Node, Arc >::out_nodes(), Aleph::out_nodes(), Aleph::QuickHull::partition(), Aleph::k_shortest_paths_detail::path_to_state(), FunctionalMethods< Container, T >::pfilter(), Aleph::pointers_list(), Aleph::pointers_list(), populate_dyndlist(), populate_dynlist(), DlinkListOperationsTest::populateList(), Aleph::Gen_Polynomial< Coefficient >::positive_divisors(), FunctionalMethods< Container, T >::ptr_filter(), Aleph::DynListQueue< T >::put(), Aleph::DynListQueue< T >::put(), K2Tree< T >::range(), Aleph::range_to_DynList(), reference_split_string(), Aleph::Array_Graph< __Graph_Node, __Graph_Arc >::remove_node(), Aleph::Gen_MultiPolynomial< Coefficient, MonomOrder >::remove_zeros(), Aleph::Gen_Polynomial< Coefficient >::remove_zeros(), Aleph::rep(), roots_and_interpolation(), Aleph::Dial_Min_Paths< GT, Distance, Itor, SA >::run_dial(), Aleph::Gen_Polynomial< Coefficient >::scale_inplace(), Aleph::scanl(), Aleph::scanl_sum(), Aleph::Tarjan_Connected_Components< GT, Itor, SA >::scc_by_len(), Aleph::Tarjan_Connected_Components< GT, Itor, SA >::scc_by_lists(), scenario_construction(), scenario_in_circle_in_delaunay_context(), Aleph::sequential_groups(), Aleph::Bloom_Filter< T >::set_bits(), Aleph::set_to_DynList(), DynListRemovePredicateTest::SetUp(), DynListIteratorTest::SetUp(), Aleph::solve_assignment(), Aleph::solve_circulation(), sparse_polynomials(), Aleph::Dlink::split_list_ne(), Aleph::split_n(), Aleph::split_text_into_words(), Aleph::detail::spp_find_sleeve(), Aleph::stl_container_to_dynList(), Aleph::Gen_Polynomial< Coefficient >::sturm_chain(), Aleph::sublist(), Aleph::t_enum_zip(), Aleph::t_enum_zip_eq(), Aleph::t_zip(), Aleph::t_zip_eq(), FunctionalMethods< Container, T >::take(), FunctionalMethods< Container, T >::take(), Aleph::take_while(), Aleph::Gen_Polynomial< Coefficient >::terms_list(), 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(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), test_all_constructors_agree(), test_construct_all_identical(), test_construct_from_dynlist(), test_container(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), test_list(), to_dynlist(), Aleph::FunctionalMixin< Derived, Type >::tpartition(), FunctionalMethods< Container, T >::tpartition(), transfer_function(), Aleph::transpose(), Aleph::MonotonePolygonTriangulation::triangulate_monotone(), Aleph::tunzip(), TYPED_TEST(), TYPED_TEST(), TYPED_TEST_P(), TYPED_TEST_P(), Aleph::uni_unzip(), Aleph::uni_zip_to_dynlist(), Aleph::Zero_One_BFS< GT, Distance, Itor, SA >::uninit_paint(), Aleph::unzip(), Aleph::AHMapping< Key, ValueType >::values(), Aleph::MapOpenHash< Key, Data, Cmp, HashTable >::values_ptr(), Aleph::DynMapTree< Key, Data, Tree, Compare >::values_ptr(), Aleph::DynMapHashTable< Key, Data, HashTable, Cmp >::values_ptr(), Aleph::vector_to_DynList(), Aleph::vector_to_DynList(), Aleph::Tikz_Scene::visualize_convex_hull(), Aleph::welsh_powell_coloring(), Aleph::Cnode::words_impl(), Aleph::Dlink::wrap_header(), Aleph::yen_k_shortest_paths(), Aleph::Gen_Polynomial< Coefficient >::yun_sfd(), Aleph::zip_filter(), Aleph::zip_lists(), Aleph::zip_map(), Aleph::zip_maps(), Aleph::zip_maps_if(), Aleph::zip_partition(), Aleph::zip_take(), and Aleph::zip_take_while().
|
inlinenoexcept |
Append listat the end of this by movement.
append(l) (in this rvalue version), puts in constant time the items of l at the end of this. After calling l becomes empty.
l is a 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 responsibility, if and only if you are absolutely sure that the list will not be needed after.| [in] | list | a rvalue reference to the list to be appended |
Definition at line 1619 of file htlist.H.
References Aleph::HTList::append().
Append a new item by movement.
Allocate memory for a new item, move to its allocated place and append it at the end of the list.
| `bad_alloc` | if there is no enough memory |
Definition at line 1286 of file htlist.H.
References Aleph::DynList< T >::__append().
|
inlinenoexcept |
Empties the container.
| none |
Definition at line 1411 of file htlist.H.
References Aleph::DynList< T >::empty().
Referenced by Aleph::AdversarialTraceCollector< Move, Score >::clear(), and TEST().
|
inlinenoexcept |
empty the list
Definition at line 1389 of file htlist.H.
References Aleph::HTList::get_first(), Aleph::HTList::get_last(), Aleph::Snodenc< T >::get_next(), Aleph::HTList::is_empty(), and Aleph::HTList::reset().
Referenced by Aleph::DynList< T >::~DynList(), Aleph::DynList< T >::clear(), Aleph::SearchSolutionCollector< Solution >::clear(), Aleph::compute_min_cut(), Aleph::DynListQueue< T >::empty(), Aleph::DynListStack< T >::empty(), Aleph::Karger_Min_Cut< GT, SA >::fast(), Aleph::Karger_Min_Cut< GT, SA >::karger_min_cut(), Aleph::Stoer_Wagner_Min_Cut< GT, Distance, SA >::operator()(), Aleph::DynList< T >::operator=(), to_dynlist(), and TYPED_TEST_P().
|
inline |
Definition at line 1337 of file htlist.H.
References Aleph::DynList< T >::remove().
Referenced by Aleph::DynList< T >::operator[](), scenario_sensor_monitoring(), TEST_F(), TEST_F(), and TEST_F().
Obtains a modifiable reference to the i-th item of this.
Throws overflow_error if i is greater or equal to number of elements
Definition at line 1677 of file htlist.H.
References Aleph::and, Aleph::divide_and_conquer_partition_dp(), Aleph::DynList< T >::Iterator::get_curr(), Aleph::HTList::Iterator::has_curr(), and Aleph::HTList::Iterator::next_ne().
|
inline |
Return the first item of the list.
| underflow_error | if the list is empty |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 1375 of file htlist.H.
References ah_underflow_error_if, Aleph::DynList< T >::get_first_ne(), and Aleph::HTList::is_empty().
Referenced by Aleph::Path< GT >::check(), check_list(), Aleph::Find_Eulerian_Path< GT, SN, SA >::find_node_sequence(), Aleph::DynListQueue< T >::front(), Aleph::DynListQueue< T >::front(), Aleph::Find_Eulerian_Path< GT, SN, SA >::hierholzer_directed(), Aleph::Find_Eulerian_Path< GT, SN, SA >::hierholzer_undirected(), Aleph::in_place_transpose(), Aleph::k_shortest_paths_detail::state_to_path(), 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(), Aleph::DynListStack< T >::top(), Aleph::DynList< T >::top(), Aleph::DynListStack< T >::top(), TYPED_TEST_P(), and Aleph::unzip().
|
inlinenoexcept |
Return the first item of the list without exception.
Definition at line 1353 of file htlist.H.
References Aleph::HTList::get_first().
Referenced by Aleph::DynList< T >::get_first(), and Aleph::merge_lists().
|
deletenoexcept |
|
inline |
Return the last item of the list.
| underflow_error | if the list is empty |
Definition at line 1363 of file htlist.H.
References ah_underflow_error_if, Aleph::DynList< T >::get_last_ne(), and Aleph::HTList::is_empty().
Referenced by Aleph::format_string_csv(), Aleph::inconnected_components(), Aleph::ShortestPathInPolygon::operator()(), Aleph::DynListQueue< T >::rear(), Aleph::DynListQueue< T >::rear(), 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(), and TYPED_TEST_P().
|
inlinenoexcept |
Return the last item of the list without exception.
Definition at line 1343 of file htlist.H.
References Aleph::Snodenc< T >::get_data(), and Aleph::HTList::get_last().
Referenced by Aleph::DynList< T >::get_last().
|
deletenoexcept |
Insert to this a copy of list.
This version of insert(l) traverses the items of l and insert a copy into this.
| [in] | list | list to be copied at the end |
| bad_alloc | if there is no enough memory |
Definition at line 1668 of file htlist.H.
References Aleph::divide_and_conquer_partition_dp(), and Aleph::HTList::insert().
Insert a new item by copy.
Allocate memory for a new item, copy and insert into the list as the first item.
| `bad_alloc` | if there is no enough memory |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 1220 of file htlist.H.
References Aleph::DynList< T >::__insert().
Referenced by Aleph::Bidirectional_BFS< GT, Fwd_Itor, Bck_Itor, SA >::build_path(), Aleph::compute_min_cut(), demo_dynlist(), Aleph::foldr(), Aleph::Gen_MultiPolynomial< Coefficient, MonomOrder >::for_each_term_desc(), Aleph::Zero_One_BFS< GT, Distance, Itor, SA >::get_min_path(), Aleph::Find_Eulerian_Path< GT, SN, SA >::hierholzer_directed(), Aleph::Find_Eulerian_Path< GT, SN, SA >::hierholzer_undirected(), Aleph::Test_Eulerian< GT, SN, SA >::is_connected(), Aleph::Test_Eulerian< GT, SN, SA >::is_strongly_connected(), main(), Aleph::Network_Simplex< Net >::pivot_tree(), Aleph::DynListStack< T >::push(), Aleph::DynList< T >::push(), Aleph::DynListStack< T >::push(), Aleph::DynList< T >::push(), FunctionalMethods< Container, T >::rev(), Aleph::DynList< T >::reverse(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), test_container(), TEST_F(), TEST_F(), TEST_F(), test_list(), and test_tree().
|
inlinenoexcept |
Insert listat the beginning of this by movement.
insert(l) (in this rvalue version), puts in constant time the items of l at the beginning of this. After calling l becomes empty.
l is a 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 responsibility, if and only if you are absolutely sure that the list will not be needed after.| [in] | list | a rvalue reference to the list to be inserted |
Definition at line 1639 of file htlist.H.
References Aleph::HTList::insert().
|
inline |
Insert a new item by movement.
Allocate memory for a new item, move the item and insert into the list as the first item. This operation can be faster that the equivalent with copy
| `bad_alloc` | if there is no enough memory |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 1235 of file htlist.H.
References Aleph::DynList< T >::__insert().
|
inline |
Assign to this a copy of l
First, the list is emptied (all its elements are deleted). Then sequential copy of each item of l is inserted into this.
This assignation takes \(O(|l|)\) in complexity.
| [in] | l | list whose items want to be inserted into this |
| `bad_alloc` | if there is no enough memory |
Definition at line 1573 of file htlist.H.
References Aleph::DynList< T >::append(), Aleph::DynList< T >::empty(), Aleph::HTList::Iterator::has_curr(), and l.
|
inlinenoexcept |
Assign to this by movement the list l
This assignation swaps the content of this with the content of l. This swapping is done in \(O(1)\).
l is a rvalue reference, take care of that if you are interested in to avoid the copy. So, if you have a lvalue referenced to a list, use std::move(), upon your responsibility, if and only if you are absolutely sure that the list will not be needed after.| [in] | l | a rvalue reference to the list to be assigned by movement. |
Definition at line 1600 of file htlist.H.
References l, and Aleph::DynList< T >::swap().
|
inline |
Array-style access to the i-th item. Equivalent to get(i).
Definition at line 1687 of file htlist.H.
References Aleph::DynList< T >::get().
|
inline |
Definition at line 1241 of file htlist.H.
References Aleph::DynList< T >::insert().
Referenced by Aleph::DynList< T >::put(), Aleph::DynList< T >::put(), and TEST_F().
Definition at line 1247 of file htlist.H.
References Aleph::DynList< T >::insert().
Definition at line 1250 of file htlist.H.
References Aleph::DynList< T >::push().
Referenced by Aleph::compute_bipartite(), TEST_F(), TEST_F(), and TEST_F().
Definition at line 1256 of file htlist.H.
References Aleph::DynList< T >::push().
|
inline |
Remove the first item of the list.
| underflow_error | if the list is empty |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 1311 of file htlist.H.
References Aleph::divide_and_conquer_partition_dp(), l, and Aleph::HTList::remove_head().
Referenced by Aleph::DynList< T >::get(), Aleph::DynList< T >::remove_first(), and TEST().
|
inline |
Remove the first element matching an equality criteria.
remove(eq) sequentially traverses the list and on each current element curr it calls to eq(curr). If the test is true, then curr is removed from the list and a copy of curr is returned. Otherwise, if no element matches with eq() test, then exception domain_error is thrown.
The eq() must match the following signature:
bool eq(const T& op)
This test would return true when op satisfies the finding criteria`.
Since that this method is overloaded, you could define several flavors: a more sophisticated functor, function pointers or lambdas.
| [in] | eq | equality test |
domain_error is thrown. Definition at line 1529 of file htlist.H.
References ah_domain_error, Aleph::divide_and_conquer_partition_dp(), Aleph::eq(), and Aleph::HTList::Iterator::has_curr().
|
inline |
Definition at line 1328 of file htlist.H.
References Aleph::DynList< T >::remove().
Referenced by Aleph::Path< GT >::check(), Aleph::ShortestPathInPolygon::find_sleeve(), Aleph::gen_seq_list_tuples(), Aleph::DynListQueue< T >::get(), Aleph::get_futures(), Aleph::Find_Eulerian_Path< GT, SN, SA >::hierholzer_directed(), Aleph::Find_Eulerian_Path< GT, SN, SA >::hierholzer_undirected(), Aleph::in_place_transpose(), Aleph::Test_Eulerian< GT, SN, SA >::is_connected(), Aleph::Test_Eulerian< GT, SN, SA >::is_strongly_connected(), Aleph::DynList< T >::pop(), Aleph::DynListStack< T >::pop(), Aleph::Dial_Min_Paths< GT, Distance, Itor, SA >::run_dial(), QuadTree::split(), Aleph::detail::spp_find_sleeve(), TEST(), TEST(), and TEST().
|
inlinenoexcept |
Definition at line 1322 of file htlist.H.
References Aleph::DynList< T >::remove_ne().
Referenced by Aleph::merge_lists().
|
inlinenoexcept |
Remove the first item of the list without exception.
| underflow_error | if the list is empty |
Definition at line 1296 of file htlist.H.
References Aleph::divide_and_conquer_partition_dp(), l, and Aleph::HTList::remove_head_ne().
Referenced by Aleph::DynList< T >::remove_first_ne().
|
inlinenoexcept |
Definition at line 1491 of file htlist.H.
References Aleph::divide_and_conquer_partition_dp(), Aleph::eq(), and Aleph::HTList::Iterator::has_curr().
|
inline |
Definition at line 1488 of file htlist.H.
References Aleph::DynList< T >::reverse().
|
inlinenoexcept |
Definition at line 1475 of file htlist.H.
References Aleph::DynList< T >::reverse().
Referenced by List_of_25_items::List_of_25_items(), and Aleph::traverse_perm().
|
inline |
Return a reversed copy of this.
Not confuse with reverse without const which mutates this
Definition at line 1479 of file htlist.H.
References Aleph::divide_and_conquer_partition_dp(), LocateFunctions< Container, Type >::get_it(), and Aleph::DynList< T >::insert().
|
inlinenoexcept |
Definition at line 1469 of file htlist.H.
References Aleph::HTList::reverse_list().
Referenced by main(), Aleph::DynList< T >::rev(), Aleph::DynList< T >::rev(), TEST(), TEST(), TEST(), TEST_F(), TEST_F(), and TEST_F().
Swap this with l. All items of each list are swapped in constant
time
Definition at line 1176 of file htlist.H.
References l, and Aleph::HTList::swap().
Referenced by Aleph::DynList< T >::DynList(), Aleph::Karger_Min_Cut< GT, SA >::fast(), Aleph::in_place_transpose(), Aleph::Karger_Min_Cut< GT, SA >::karger_min_cut(), Aleph::DynList< T >::operator=(), Aleph::DynListQueue< T >::operator=(), Aleph::DynListStack< T >::operator=(), Aleph::DynListQueue< T >::swap(), Aleph::DynListStack< T >::swap(), TEST(), and TEST_F().
|
inline |