SheafSystem
0.0.0.0
|
Wrapper class for forward_list or slist depending on compiler. The class replicates the minimum subset of the forward_list and slist classes. It also implements a push_front function that takes a range. More...
#include <singly_linked_list.h>
Public Member Functions | |
singly_linked_list () | |
Default Constructor. More... | |
singly_linked_list (size_type count) | |
Constructs the container with count value-initialized (default constructed, for classes) instances of T. No copies are made. More... | |
singly_linked_list (size_type count, const T &value) | |
Constructs the container with count copies of elements with value value. More... | |
singly_linked_list (const singly_linked_list &other) | |
Copy Constructor. More... | |
~singly_linked_list () | |
Destructor. More... | |
singly_linked_list & | operator= (const singly_linked_list &other) |
Copy assignment operator. Replaces the contents with a copy of the contents of other. More... | |
singly_linked_list & | operator= (singly_linked_list &other) |
Move assignment operator. Replaces the contents with those of other using move semantics (i.e. the data in other is moved from other into this container). other is in a valid but unspecified state afterwards. More... | |
void | swap (singly_linked_list &other) |
Echanges the contents of the container with those of other. Does not invoke any move, copy, or swap operations on individual elements. More... | |
reference | front () |
Returns a reference to the first element in the container. More... | |
const_reference | front () const |
Returns a reference to the first element in the container. More... | |
iterator | begin () |
Returns an iterator to the first element of the container. More... | |
const_iterator | begin () const |
Returns an iterator to the first element of the container. More... | |
iterator | end () |
Returns an iterator to the element following the last element of the container. More... | |
const_iterator | end () const |
Returns an iterator to the element following the last element of the container. More... | |
bool | empty () const |
Checks if the container has no elements, i.e. whether begin() == end(). More... | |
size_type | max_size () const |
Returns the maximum number of elements the container is able to hold due to system or library implementation limitations. More... | |
void | clear () |
Removes all elements from the container. More... | |
iterator | insert_after (const_iterator pos, const T &value) |
Inserts value after the element pointed to by pos. More... | |
iterator | insert_after (const_iterator pos, T &&value) |
Inserts value after the element pointed to by pos. More... | |
void | insert_after (const_iterator pos, size_type count, const T &value) |
Inserts count copies of the value after the element pointed to by pos. More... | |
template<class InputIt > | |
void | insert_after (const_iterator pos, InputIt first, InputIt last) |
inserts elements from range [first, last) after the element pointed to by pos. More... | |
iterator | erase_after (const_iterator position) |
Removes the element following pos. More... | |
void | push_front (const T &value) |
Prepends the given element value to the beginning of the container. More... | |
void | push_front (T &value) |
Prepends the given element value to the beginning of the container. More... | |
template<class InputIt > | |
void | push_front (InputIt first, InputIt last) |
Prepends the range [first, last) to the beginning of the containter. More... | |
void | pop_front () |
Removes the first element of the container. More... | |
void | resize (size_type count) |
Resizes the container to contain count elements. Additional value-initialized elements are appended. More... | |
void | resize (size_type count, const value_type &value) |
Resizes the container to contain count elements. Additional copies of value are appended. More... | |
void | merge (singly_linked_list &other) |
Merges two sorted lists into one. The lists should be sorted into ascending order. More... | |
void | remove (const T &value) |
Removes all elements with value. More... | |
void | reverse () |
Reverses the order of the elements in the container. More... | |
void | unique () |
Removes all consecutive duplicate elements from the container. More... | |
void | sort () |
Sorts the elements in ascending order. More... | |
Friends | |
bool | operator== (const singly_linked_list< T, A > &lhs, const singly_linked_list< T, A > &rhs) |
bool | operator (const singly_linked_list< T, A > &lhs, const singly_linked_list< T, A > &rhs) |
Wrapper class for forward_list or slist depending on compiler. The class replicates the minimum subset of the forward_list and slist classes. It also implements a push_front function that takes a range.
Definition at line 42 of file singly_linked_list.h.
|
inline |
Default Constructor.
Definition at line 95 of file singly_linked_list.h.
|
inline |
Constructs the container with count value-initialized (default constructed, for classes) instances of T. No copies are made.
Definition at line 104 of file singly_linked_list.h.
|
inline |
Constructs the container with count copies of elements with value value.
Definition at line 112 of file singly_linked_list.h.
|
inline |
Copy Constructor.
Definition at line 120 of file singly_linked_list.h.
|
inline |
Destructor.
Definition at line 128 of file singly_linked_list.h.
|
inline |
Returns an iterator to the first element of the container.
Definition at line 184 of file singly_linked_list.h.
Referenced by geometry::d_bin_point_locator< DC, DB >::all_points_at_value(), geometry::cylindrical_point_locator::all_points_at_value(), geometry::d_array_point_locator< DC, DB >::box_list(), geometry::d_bin_point_locator< DC, DB >::branch_points_at_value(), geometry::cylindrical_point_locator::branch_points_at_value(), geometry::d_array_point_locator< DC, DB >::contains_box(), geometry::array_cylindrical_point_locator::contains_box(), geometry::db0_point_locator< DC >::find_closest_vertex_in_bin(), geometry::d_bin_point_locator< DC, DB >::point_at_value(), geometry::cylindrical_point_locator::point_at_value(), sheaf::ptr_linked_pool< geometry::d_tree_point_locator_node< DC, DB > >::print(), and geometry::db0_point_locator< DC >::print_bins().
|
inline |
Returns an iterator to the first element of the container.
Definition at line 192 of file singly_linked_list.h.
|
inline |
Removes all elements from the container.
Definition at line 235 of file singly_linked_list.h.
Referenced by fiber_bundle::discretization_iterator::force_is_done().
|
inline |
Checks if the container has no elements, i.e. whether begin() == end().
Definition at line 218 of file singly_linked_list.h.
Referenced by fiber_bundle::discretization_iterator::next().
|
inline |
Returns an iterator to the element following the last element of the container.
Definition at line 201 of file singly_linked_list.h.
Referenced by geometry::d_bin_point_locator< DC, DB >::all_points_at_value(), geometry::cylindrical_point_locator::all_points_at_value(), geometry::d_array_point_locator< DC, DB >::box_list(), geometry::d_bin_point_locator< DC, DB >::branch_points_at_value(), geometry::cylindrical_point_locator::branch_points_at_value(), geometry::d_array_point_locator< DC, DB >::contains_box(), geometry::array_cylindrical_point_locator::contains_box(), geometry::db0_point_locator< DC >::find_closest_vertex_in_bin(), geometry::d_bin_point_locator< DC, DB >::point_at_value(), geometry::cylindrical_point_locator::point_at_value(), sheaf::ptr_linked_pool< geometry::d_tree_point_locator_node< DC, DB > >::print(), and geometry::db0_point_locator< DC >::print_bins().
|
inline |
Returns an iterator to the element following the last element of the container.
Definition at line 210 of file singly_linked_list.h.
|
inline |
Removes the element following pos.
Definition at line 290 of file singly_linked_list.h.
|
inline |
Returns a reference to the first element in the container.
Definition at line 168 of file singly_linked_list.h.
Referenced by fiber_bundle::discretization_iterator::next().
|
inline |
Returns a reference to the first element in the container.
Definition at line 176 of file singly_linked_list.h.
|
inline |
Inserts value after the element pointed to by pos.
Definition at line 252 of file singly_linked_list.h.
|
inline |
Inserts value after the element pointed to by pos.
Definition at line 260 of file singly_linked_list.h.
|
inline |
Inserts count copies of the value after the element pointed to by pos.
Definition at line 268 of file singly_linked_list.h.
|
inline |
inserts elements from range [first, last) after the element pointed to by pos.
Definition at line 278 of file singly_linked_list.h.
|
inline |
Returns the maximum number of elements the container is able to hold due to system or library implementation limitations.
Definition at line 227 of file singly_linked_list.h.
|
inline |
Merges two sorted lists into one. The lists should be sorted into ascending order.
Definition at line 404 of file singly_linked_list.h.
|
inline |
Copy assignment operator. Replaces the contents with a copy of the contents of other.
Definition at line 136 of file singly_linked_list.h.
|
inline |
Move assignment operator. Replaces the contents with those of other using move semantics (i.e. the data in other is moved from other into this container). other is in a valid but unspecified state afterwards.
Definition at line 149 of file singly_linked_list.h.
|
inline |
Removes the first element of the container.
Definition at line 377 of file singly_linked_list.h.
Referenced by fiber_bundle::discretization_iterator::next().
|
inline |
Prepends the given element value to the beginning of the container.
Definition at line 348 of file singly_linked_list.h.
Referenced by geometry::d_array_point_locator< DC, DB >::box_list(), geometry::d_tree_point_locator_node< DC, DB >::insert_box(), and fiber_bundle::discretization_iterator::next().
|
inline |
Prepends the given element value to the beginning of the container.
Definition at line 356 of file singly_linked_list.h.
|
inline |
Prepends the range [first, last) to the beginning of the containter.
Definition at line 365 of file singly_linked_list.h.
|
inline |
Removes all elements with value.
Definition at line 413 of file singly_linked_list.h.
|
inline |
Resizes the container to contain count elements. Additional value-initialized elements are appended.
Definition at line 386 of file singly_linked_list.h.
|
inline |
Resizes the container to contain count elements. Additional copies of value are appended.
Definition at line 395 of file singly_linked_list.h.
|
inline |
Reverses the order of the elements in the container.
Definition at line 421 of file singly_linked_list.h.
|
inline |
Sorts the elements in ascending order.
Definition at line 437 of file singly_linked_list.h.
|
inline |
Echanges the contents of the container with those of other. Does not invoke any move, copy, or swap operations on individual elements.
Definition at line 160 of file singly_linked_list.h.
|
inline |
Removes all consecutive duplicate elements from the container.
Definition at line 429 of file singly_linked_list.h.