![]() |
aGrUM 3.0.0
a C++ library for (probabilistic) graphical models
|
Generic doubly linked lists. More...
#include <agrum/base/core/list.h>
Public Types | |
| enum class | location { BEFORE , AFTER } |
| Locations around iterators where insertions of new elements can take / place. More... | |
| using | value_type = Val |
| Types for STL compliance. | |
| using | reference = Val& |
| Types for STL compliance. | |
| using | const_reference = const Val& |
| Types for STL compliance. | |
| using | pointer = Val* |
| Types for STL compliance. | |
| using | const_pointer = const Val* |
| Types for STL compliance. | |
| using | size_type = Size |
| Types for STL compliance. | |
| using | difference_type = std::ptrdiff_t |
| Types for STL compliance. | |
| using | iterator = ListIterator< Val > |
| Types for STL compliance. | |
| using | const_iterator = ListConstIterator< Val > |
| Types for STL compliance. | |
| using | iterator_safe = ListIteratorSafe< Val > |
| Types for STL compliance. | |
| using | const_iterator_safe = ListConstIteratorSafe< Val > |
| Types for STL compliance. | |
Public Member Functions | |
Constructors / Destructors | |
| List () | |
| A basic constructor that creates an empty list. | |
| List (const List< Val > &src) | |
| Copy constructor. | |
| List (List< Val > &&src) noexcept | |
| Move constructor. | |
| List (std::initializer_list< Val > list) | |
| Initializer_list constructor. | |
| ~List () | |
| Class destructor. | |
Iterators | |
| const const_iterator_safe & | cendSafe () const noexcept |
| Returns a safe const iterator pointing to the end of the List. | |
| const iterator_safe & | endSafe () noexcept |
| Returns a safe iterator pointing to the end of the List. | |
| const const_iterator_safe & | crendSafe () const noexcept |
| Return a safe const iterator pointing just before the beginning of the List. | |
| const iterator_safe & | rendSafe () noexcept |
| Returns a safe iterator pointing just before the beginning of the List. | |
| const_iterator_safe | cbeginSafe () const |
| Returns a safe const iterator pointing to the beginning of the List. | |
| iterator_safe | beginSafe () |
| Returns a safe iterator pointing to the beginning of the List. | |
| const_iterator_safe | crbeginSafe () const |
| Returns a safe const iterator pointing to the last element of the List. | |
| iterator_safe | rbeginSafe () |
| Returns a safe iterator pointing to the last element of the List. | |
| const const_iterator & | cend () const noexcept |
| Returns an unsafe const iterator pointing to the end of the List. | |
| const iterator & | end () noexcept |
| Returns an unsafe iterator pointing to the end of the List. | |
| const const_iterator & | end () const noexcept |
| Returns an unsafe const iterator pointing to the end of the List. | |
| const const_iterator & | crend () const noexcept |
| Returns an unsafe const iterator pointing just before the beginning of the List. | |
| const iterator & | rend () noexcept |
| Returns an unsafe iterator pointing just before the beginning of the List. | |
| const const_iterator & | rend () const noexcept |
| Returns an unsafe const iterator pointing just before the beginning of the List. | |
| const_iterator | cbegin () const |
| Returns an unsafe const iterator pointing to the beginning of the List. | |
| iterator | begin () |
| Returns an unsafe iterator pointing to the beginning of the List. | |
| const_iterator | begin () const |
| Returns an unsafe const iterator pointing to the beginning of the List. | |
| const_iterator | crbegin () const |
| Returns an unsafe const iterator pointing to the last element of the List. | |
| iterator | rbegin () |
| Returns an unsafe iterator pointing to the last element of the List. | |
| const_iterator | rbegin () const |
| Returns an unsafe const iterator pointing to the last element of the List. | |
Accessors / Modifiers | |
| Val & | pushFront (const Val &val) |
| Inserts a new element (a copy) at the beginning of the chained list. | |
| Val & | pushFront (Val &&val) |
| Inserts a new element (a move) at the beginning of the chained list. | |
| template<typename... Args> | |
| Val & | push_front (Args &&... args) |
| An alias for pushFront used for STL compliance. | |
| template<typename... Args> | |
| Val & | emplaceFront (Args &&... args) |
| Emplace elements at the beginning of the chained list. | |
| Val & | pushBack (const Val &val) |
| Inserts a new element (a copy) at the end of the chained list. | |
| Val & | pushBack (Val &&val) |
| Inserts a new element (a move) at the end of the chained list. | |
| template<typename... Args> | |
| Val & | push_back (Args &&... args) |
| An alias for pushBack used for STL compliance. | |
| template<typename... Args> | |
| Val & | emplaceBack (Args &&... args) |
| Emplace elements at the end of the chained list. | |
| Val & | insert (const Val &val) |
| Inserts a new element at the end of the chained list (alias of pushBack). | |
| Val & | insert (Val &&val) |
| Inserts a new element at the end of the chained list (alias of pushBack). | |
| Val & | insert (Size pos, const Val &val) |
| Inserts a new element at the ith pos of the chained list. | |
| Val & | insert (Size pos, Val &&val) |
| Insert an rvalue at the ith pos of the chained list. | |
| Val & | insert (const const_iterator_safe &iter, const Val &val, location place=location::BEFORE) |
| Inserts a new element before or after a given iterator. | |
| Val & | insert (const const_iterator_safe &iter, Val &&val, location place=location::BEFORE) |
| Inserts an rvalue before or after a given iterator. | |
| Val & | insert (const const_iterator &iter, const Val &val, location place=location::BEFORE) |
| Inserts a new element before or after a given iterator. | |
| Val & | insert (const const_iterator &iter, Val &&val, location place=location::BEFORE) |
| Inserts an rvalue before or after a given iterator. | |
| template<typename... Args> | |
| Val & | emplace (const const_iterator &iter, Args &&... args) |
| Emplace a new element before a given iterator. | |
| template<typename... Args> | |
| Val & | emplace (const const_iterator_safe &iter, Args &&... args) |
| Emplace a new element before a given safe iterator. | |
| Val & | front () const |
| Returns a reference to first element of a list, if any. | |
| Val & | back () const |
| Returns a reference to last element of a list, if any. | |
| Size | size () const noexcept |
| Returns the number of elements in the list. | |
| bool | exists (const Val &val) const |
| Checks whether there exists a given element in the list. | |
| void | erase (Size i) |
| Erases the ith element of the List (the first one is in position 0). | |
| void | erase (const iterator_safe &iter) |
| Erases the element of the List pointed to by the safe iterator. | |
| void | erase (const const_iterator_safe &iter) |
| Erases the element of the List pointed to by the safe const iterator. | |
| void | eraseByVal (const Val &val) |
| erases the first element encountered with a given value. | |
| void | eraseAllVal (const Val &val) |
| erases all the elements encountered with a given value | |
| void | popBack () |
| Removes the last element of a List, if any. | |
| void | popFront () |
| Removes the first element of a List, if any. | |
| void | clear () |
| Deletes all the elements of a chained list. | |
| bool | empty () const noexcept |
| Returns a boolean indicating whether the chained list is empty. | |
| void | swap (List &other_list) |
| Swap the current list with another one. | |
| std::string | toString () const |
| Converts a list into a string. | |
| template<typename Mount> | |
| List< Mount > | map (Mount(*f)(Val)) const |
| Creates a list of mountains from a list of val. | |
| template<typename Mount> | |
| List< Mount > | map (Mount(*f)(Val &)) const |
| Creates a list of mountains from a list of val. | |
| template<typename Mount> | |
| List< Mount > | map (Mount(*f)(const Val &)) const |
| Creates a list of mountains from a list of val. | |
| template<typename Mount> | |
| List< Mount > | map (const Mount &mount) const |
| Creates a list of mountains with a given value from a list of val. | |
Operators | |
| List< Val > & | operator= (const List< Val > &src) |
| Copy operator. | |
| List< Val > & | operator= (List< Val > &&src) |
| Move operator. | |
| Val & | operator+= (const Val &val) |
| Inserts a new element at the end of the list (alias of pushBack). | |
| Val & | operator+= (Val &&val) |
| Inserts a new element at the end of the list (alias of pushBack). | |
| bool | operator== (const List< Val > &src) const |
| Checks whether two lists are identical (same elements in the same order). | |
| bool | operator!= (const List< Val > &src) const |
| Checks whether two lists are different (different elements or orders). | |
| Val & | operator[] (const Size i) |
| Returns the ith element in the current chained list. | |
| const Val & | operator[] (const Size i) const |
| Returns the const ith element in the current chained list. | |
Private Member Functions | |
| void | _copy_elements_ (const List< Val > &src) |
| A function used to perform copies of elements of Lists. | |
| ListBucket< Val > * | _getIthBucket_ (Size i) const noexcept |
| Returns the bucket corresponding to the ith position in the list. | |
| ListBucket< Val > * | _getBucket_ (const Val &val) const noexcept |
| Returns the bucket corresponding to a given value. | |
| void | _erase_ (ListBucket< Val > *bucket) |
| Removes an element from a chained list. | |
| ListBucket< Val > * | _createBucket_ (const Val &val) const |
| Create a new bucket with a given value. | |
| ListBucket< Val > * | _createBucket_ (Val &&val) const |
| Create a new bucket with a given value. | |
| template<typename... Args> | |
| ListBucket< Val > * | _createEmplaceBucket_ (Args &&... args) const |
| Create an emplace bucket. | |
| Val & | _pushFront_ (ListBucket< Val > *new_elt) |
| Insert a bucket at the front of the list. | |
| Val & | _pushBack_ (ListBucket< Val > *new_elt) |
| Insert a bucket at the end of the list. | |
| Val & | _insertBefore_ (ListBucket< Val > *new_elt, ListBucket< Val > *current_elt) |
| Insert a new bucket before another one. | |
| Val & | _insertAfter_ (ListBucket< Val > *new_elt, ListBucket< Val > *current_elt) |
| Insert a new bucket after another one. | |
| Val & | _insert_ (const const_iterator_safe &iter, ListBucket< Val > *new_elt, location place) |
| Inserts a new bucket before or after the location pointed to by an iterator. | |
| Val & | _insert_ (const const_iterator &iter, ListBucket< Val > *new_elt, location place) |
| Inserts a new bucket before or after the location pointed to by an iterator. | |
Private Attributes | |
| ListBucket< Val > * | _deb_list_ {nullptr} |
| A pointer on the first element of the chained list. | |
| ListBucket< Val > * | _end_list_ {nullptr} |
| A pointer on the last element of the chained list. | |
| Size | _nb_elements_ {Size(0)} |
| The number of elements in the list. | |
| std::vector< const_iterator_safe * > | _safe_iterators_ |
| The list of "safe" iterators attached to the list. | |
Friends | |
| class | ListIterator< Val > |
| ListIterator should be a friend to optimize access to elements. | |
| class | ListConstIterator< Val > |
| ListIterator should be a friend to optimize access to elements. | |
| class | ListIteratorSafe< Val > |
| ListIterator should be a friend to optimize access to elements. | |
| class | ListConstIteratorSafe< Val > |
| ListIterator should be a friend to optimize access to elements. | |
Generic doubly linked lists.
List enables fast and safe manipulation of chained lists. Unless the elements are rvalues, the insertions of new elements into the lists are ALWAYS performed by copy, i.e., each time we add a new element X to the List, a copy of X is actually created and this very copy is stored into the list. For rvalues, move operations are performed.
The List iterators are implemented so as to avoid segmentation faults when elements of the list are deleted while some safe iterators are pointing on them. Moreover they ensure that, when elements are removed from a List, iterators on that list will never access these elements (which is not the case for the iterators in the C++ standard library). Note that this guarantee is ensured at low cost as experimental results show that List and ListIterator are as efficient as their STL counterparts. However, this guarantee can hold only if List is aware of all of the iterators pointing to it: thus, when List erases one element, it can parse the list of its iterators and update those that point toward the now deleted element. When parsing elements without removing any element, you can use unsafe iterators instead of safe ones because they are slightly faster. But those will most certainly segfault if they perform some operations on deleted elements.
| Val | The values type stored in the gum::List. |
| using gum::List< Val >::const_iterator = ListConstIterator< Val > |
| using gum::List< Val >::const_iterator_safe = ListConstIteratorSafe< Val > |
| using gum::List< Val >::const_pointer = const Val* |
| using gum::List< Val >::const_reference = const Val& |
| using gum::List< Val >::difference_type = std::ptrdiff_t |
| using gum::List< Val >::iterator = ListIterator< Val > |
| using gum::List< Val >::iterator_safe = ListIteratorSafe< Val > |
| using gum::List< Val >::pointer = Val* |
| using gum::List< Val >::reference = Val& |
| using gum::List< Val >::value_type = Val |
|
strong |
|
explicit |
A basic constructor that creates an empty list.
Definition at line 1167 of file list_tpl.h.
References List(), _safe_iterators_, and GUM_DEFAULT_ITERATOR_NUMBER.
Referenced by List(), List(), List(), List(), ~List(), _copy_elements_(), map(), map(), map(), map(), operator!=(), operator=(), operator=(), operator==(), and swap().
| gum::List< Val >::List | ( | const List< Val > & | src | ) |
Copy constructor.
The new list and that which is copied do not share their elements: the new list contains new instances of the values stored in the list to be copied. Of course if these values are pointers, the new values point toward the same elements. This constructor runs in linear time.
| src | the list the contents of which is copied into the current one. |
Definition at line 1177 of file list_tpl.h.
References List(), and _copy_elements_().
|
noexcept |
Move constructor.
| src | The gum::List to move. |
Definition at line 1190 of file list_tpl.h.
References List(), and _deb_list_.
| gum::List< Val >::List | ( | std::initializer_list< Val > | list | ) |
Initializer_list constructor.
| list | The initializer list. |
Definition at line 1205 of file list_tpl.h.
References List().
Class destructor.
Definition at line 1220 of file list_tpl.h.
References List(), and clear().
A function used to perform copies of elements of Lists.
Before performing the copy, we assume in this function that the current list (this) is empty (else there would be memory leak).
| src | The gum::List to copy. |
Definition at line 1108 of file list_tpl.h.
References List().
Referenced by List().
|
private |
Create a new bucket with a given value.
| val | The value of the new bucket. |
Definition at line 1400 of file list_tpl.h.
Referenced by insert(), insert(), insert(), insert(), insert(), insert(), pushBack(), pushBack(), pushFront(), and pushFront().
|
private |
Create a new bucket with a given value.
| val | The value of the new bucket. |
Definition at line 1406 of file list_tpl.h.
|
private |
Create an emplace bucket.
| Args | The emplace arguments types. |
| args | The emplace arguments. |
Definition at line 1413 of file list_tpl.h.
References gum::ListBucket< Val >::EMPLACE.
Referenced by emplace(), emplace(), emplaceBack(), and emplaceFront().
|
private |
Removes an element from a chained list.
If parameter bucket is equal to 0, then the method does not perform anything, else the bucket is deleted. In the latter case, no test is ever performed to check that the bucket does actually belong to the List. The method runs in constant time.
| bucket | A pointer on the bucket in the chained list we wish to remove. |
Definition at line 1725 of file list_tpl.h.
References _deb_list_, _end_list_, _nb_elements_, gum::ListBucket< Val >::_next_, gum::ListBucket< Val >::_prev_, and _safe_iterators_.
Referenced by erase(), erase(), erase(), eraseAllVal(), eraseByVal(), popBack(), and popFront().
|
privatenoexcept |
Returns the bucket corresponding to a given value.
Actually, this is the first bucket of value val encountered in the list, if any, that is returned. If the element cannot be found, 0 is returned. This method enables fast removals of buckets. It runs in linear time.
Comparisons between Val instances are performed through == operators.
| val | The value of the element the bucket of which we wish to return. |
Definition at line 1784 of file list_tpl.h.
References _deb_list_, gum::ListBucket< Val >::_next_, and gum::ListBucket< Val >::_val_.
Referenced by eraseByVal().
|
privatenoexcept |
Returns the bucket corresponding to the ith position in the list.
This method assumes that the list contains at least i+1 elements. The index of the first element of the list is 0.
| i | The position of the returned element. |
Definition at line 1520 of file list_tpl.h.
References _deb_list_, _end_list_, _nb_elements_, gum::ListBucket< Val >::_next_, and gum::ListBucket< Val >::_prev_.
Referenced by erase(), insert(), insert(), operator[](), and operator[]().
|
private |
Inserts a new bucket before or after the location pointed to by an iterator.
| iter | An iterator pointing where to insert a new element. |
| new_elt | The new element ot insert in the gum::List. |
| place | Where to insert the new element relatively to the iterator. |
Definition at line 1620 of file list_tpl.h.
References gum::ListConstIterator< Val >::_getBucket_(), _insertAfter_(), _insertBefore_(), _pushBack_(), AFTER, BEFORE, and GUM_ERROR.
|
private |
Inserts a new bucket before or after the location pointed to by an iterator.
| iter | An iterator pointing where to insert a new element. |
| new_elt | The new element ot insert in the gum::List. |
| place | Where to insert the new element relatively to the iterator. |
Definition at line 1587 of file list_tpl.h.
References gum::ListConstIteratorSafe< Val >::_getBucket_(), _insertAfter_(), _insertBefore_(), gum::ListConstIteratorSafe< Val >::_next_current_bucket_, gum::ListConstIteratorSafe< Val >::_null_pointing_, gum::ListConstIteratorSafe< Val >::_prev_current_bucket_, _pushBack_(), AFTER, BEFORE, and GUM_ERROR.
Referenced by emplace(), emplace(), insert(), insert(), insert(), and insert().
|
private |
Insert a new bucket after another one.
| new_elt | The new element to insert in the gum::List. |
| current_elt | The element before which new_elt will be inserted. |
Definition at line 1551 of file list_tpl.h.
References _end_list_, _nb_elements_, gum::ListBucket< Val >::_next_, gum::ListBucket< Val >::_prev_, and gum::ListBucket< Val >::_val_.
Referenced by _insert_(), and _insert_().
|
private |
Insert a new bucket before another one.
| new_elt | The new element to insert in the gum::List. |
| current_elt | The element before which new_elt will be inserted. |
Definition at line 1534 of file list_tpl.h.
References _deb_list_, _nb_elements_, gum::ListBucket< Val >::_next_, gum::ListBucket< Val >::_prev_, and gum::ListBucket< Val >::_val_.
Referenced by _insert_(), _insert_(), insert(), and insert().
|
private |
Insert a bucket at the end of the list.
| new_elt | The new element pushed at the end of the gum::List. |
Definition at line 1437 of file list_tpl.h.
References _deb_list_, _end_list_, _nb_elements_, gum::ListBucket< Val >::_prev_, and gum::ListBucket< Val >::_val_.
Referenced by _insert_(), _insert_(), emplaceBack(), pushBack(), and pushBack().
|
private |
Insert a bucket at the front of the list.
| new_elt | The new element pushed at the front of the gum::List. |
Definition at line 1420 of file list_tpl.h.
References _deb_list_, _end_list_, _nb_elements_, gum::ListBucket< Val >::_next_, and gum::ListBucket< Val >::_val_.
Referenced by emplaceFront(), pushFront(), and pushFront().
| Val & gum::List< Val >::back | ( | ) | const |
Returns a reference to last element of a list, if any.
| NotFound | exception is thrown if the list is empty. |
Definition at line 1702 of file list_tpl.h.
References _end_list_, _nb_elements_, and GUM_ERROR.
| ListIterator< Val > gum::List< Val >::begin | ( | ) |
Returns an unsafe iterator pointing to the beginning of the List.
Unsafe iterators are a little bit faster than safe iterators and they consume less memory. However, if the element they point to is erased, their dereference or their increment/decrement will produce a mess, probably a segfault. You should use them only when performance is an issue and if you are sure that they will never point to an element erased.
Definition at line 1353 of file list_tpl.h.
References ListIterator< Val >.
Referenced by map(), map(), and map().
| ListConstIterator< Val > gum::List< Val >::begin | ( | ) | const |
Returns an unsafe const iterator pointing to the beginning of the List.
Unsafe const iterators are a little bit faster than safe const iterators and they consume less memory. However, if the element they point to is erased, their dereference or their increment/decrement will produce a mess, probably a segfault. You should use them only when performance is an issue and if you are sure that they will never point to an element erased.
Returns an unsafe const iterator pointing to the beginning of the List.
Definition at line 1359 of file list_tpl.h.
References ListConstIterator< Val >.
| ListIteratorSafe< Val > gum::List< Val >::beginSafe | ( | ) |
Returns a safe iterator pointing to the beginning of the List.
Safe iterators are iterators whose state is updated by the list when the element they point to is erased. As such, in this case, they can throw an exception when we try to derefence them and they are able to perform a valid ++ or – step.
Definition at line 1341 of file list_tpl.h.
| ListConstIterator< Val > gum::List< Val >::cbegin | ( | ) | const |
Returns an unsafe const iterator pointing to the beginning of the List.
Unsafe const iterators are a little bit faster than safe const iterators and they consume less memory. However, if the element they point to is erased, their dereference or their increment/decrement will produce a mess, probably a segfault. You should use them only when performance is an issue and if you are sure that they will never point to an element erased.
Definition at line 1347 of file list_tpl.h.
References ListConstIterator< Val >.
| ListConstIteratorSafe< Val > gum::List< Val >::cbeginSafe | ( | ) | const |
Returns a safe const iterator pointing to the beginning of the List.
Safe const iterators are const iterators whose state is updated by the list when the element they point to is erased. As such, in this case, they can throw an exception when we try to derefence them and they are able to perform a valid ++ or – step.
Definition at line 1335 of file list_tpl.h.
References ListConstIteratorSafe< Val >.
|
noexcept |
Returns an unsafe const iterator pointing to the end of the List.
Unsafe const iterators are a little bit faster than safe const iterators and they consume less memory. However, if the element they point to is erased, their dereference or their increment/decrement will produce a mess, probably a segfault. You should use them only when performance is an issue and if you are sure that they will never point to an element erased.
Returns an unsafe const iterator pointing to the end of the List.
Definition at line 1287 of file list_tpl.h.
References ListConstIterator< Val >.
|
noexcept |
Returns a safe const iterator pointing to the end of the List.
Safe const iterators are const iterators whose state is updated by the list when the element they point to is erased. As such, in this case, they can throw an exception when we try to derefence them and they are able to perform a valid ++ or – step
Returns a safe const iterator pointing to the end of the List.
Definition at line 1275 of file list_tpl.h.
References ListConstIteratorSafe< Val >.
| void gum::List< Val >::clear | ( | ) |
Deletes all the elements of a chained list.
All the iterators of the list will be resetted to rend. The method runs in linear time of both the size of the list and the number of iterators attached to the List.
Definition at line 1147 of file list_tpl.h.
References _deb_list_, _end_list_, _nb_elements_, gum::ListBucket< Val >::_next_, and _safe_iterators_.
Referenced by ~List(), and operator=().
| ListConstIterator< Val > gum::List< Val >::crbegin | ( | ) | const |
Returns an unsafe const iterator pointing to the last element of the List.
Unsafe iterators are a little bit faster than safe iterators and they consume less memory. However, if the element they point to is erased, their dereference or their increment/decrement will produce a mess, probably a segfault. You should use them only when performance is an issue and if you are sure that they will never point to an element erased.
Definition at line 1379 of file list_tpl.h.
References _nb_elements_, and ListConstIterator< Val >.
| ListConstIteratorSafe< Val > gum::List< Val >::crbeginSafe | ( | ) | const |
Returns a safe const iterator pointing to the last element of the List.
Safe const iterators are const iterators whose state is updated by the list when the element they point to is erased. As such, in this case, they can throw an exception when we try to derefence them and they are able to perform a valid ++ or – step.
Definition at line 1365 of file list_tpl.h.
References _nb_elements_, and ListConstIteratorSafe< Val >.
|
noexcept |
Returns an unsafe const iterator pointing just before the beginning of the List.
Unsafe const iterators are a little bit faster than safe const iterators and they consume less memory. However, if the element they point to is erased, their dereference or their increment/decrement will produce a mess, probably a segfault. You should use them only when performance is an issue and if you are sure that they will never point to an element erased.
Definition at line 1317 of file list_tpl.h.
References ListConstIterator< Val >.
|
noexcept |
Return a safe const iterator pointing just before the beginning of the List.
Safe const iterators are const iterators whose state is updated by the list when the element they point to is erased. As such, in this case, they can throw an exception when we try to derefence them and they are able to perform a valid ++ or – step.
Return a safe const iterator pointing just before the beginning of the List.
Definition at line 1305 of file list_tpl.h.
References ListConstIteratorSafe< Val >.
| Val & gum::List< Val >::emplace | ( | const const_iterator & | iter, |
| Args &&... | args ) |
Emplace a new element before a given iterator.
Emplace is a method that allows to construct directly an element of type Val by passing to its constructor all the arguments it needs. The first element of the list is at pos 0. After the insert, the element is placed precisely at pos if pos is less than the size of the list before insertion, else it is inserted at the end of the list.
| iter | The position in the list |
| args | The arguments passed to the constructor |
Definition at line 1681 of file list_tpl.h.
References _createEmplaceBucket_(), _insert_(), and BEFORE.
| Val & gum::List< Val >::emplace | ( | const const_iterator_safe & | iter, |
| Args &&... | args ) |
Emplace a new element before a given safe iterator.
Emplace is a method that allows to construct directly an element of type Val by passing to its constructor all the arguments it needs. The first element of the list is at pos 0. After the insert, the element is placed precisely at pos if pos is less than the size of the list before insertion, else it is inserted at the end of the list.
| iter | The position in the list. |
| args | the arguments passed to the constructor. |
Definition at line 1688 of file list_tpl.h.
References _createEmplaceBucket_(), _insert_(), and BEFORE.
| Val & gum::List< Val >::emplaceBack | ( | Args &&... | args | ) |
Emplace elements at the end of the chained list.
Emplace is a method that allows to construct directly an element of type Val by passing to its constructor all the arguments it needs
| Args | The emplaced arguments types. |
| args | The arguments passed to the constructor |
Definition at line 1501 of file list_tpl.h.
References _createEmplaceBucket_(), and _pushBack_().
| Val & gum::List< Val >::emplaceFront | ( | Args &&... | args | ) |
Emplace elements at the beginning of the chained list.
Emplace is a method that allows to construct directly an element of type Val by passing to its constructor all the arguments it needs
| args | The arguments passed to the constructor. |
Definition at line 1475 of file list_tpl.h.
References _createEmplaceBucket_(), and _pushFront_().
Returns a boolean indicating whether the chained list is empty.
Definition at line 1822 of file list_tpl.h.
References _nb_elements_.
Referenced by gum::graph::_bayesBall_(), gum::prm::SVE< GUM_SCALAR >::_eliminateNodes_(), gum::prm::SVED< GUM_SCALAR >::_eliminateNodes_(), gum::prm::SVED< GUM_SCALAR >::_eliminateNodesDownward_(), gum::learning::ConstraintBasedLearning::_existsDirectedPath_(), gum::learning::SimpleMiic::_existsDirectedPath_(), gum::MeekRules::_existsDirectedPath_(), gum::BarrenNodesFinder::barrenNodes(), gum::BarrenNodesFinder::barrenNodes(), gum::graph::directedPath(), gum::graph::directedUnorientedPath(), gum::InfluenceDiagram< GUM_SCALAR >::existsPathBetween(), gum::InfluenceDiagram< GUM_SCALAR >::getChildrenDecision_(), gum::graph::hasDirectedPath(), gum::graph::hasUndirectedCycle(), gum::graph::mixedOrientedPath(), gum::graph::mixedUnorientedPath(), gum::BayesBall::relevantTensors(), gum::dSeparationAlgorithm::relevantTensors(), gum::dSeparationAlgorithm::requisiteNodes(), gum::DAGCycleDetector::setDAG(), and gum::graph::undirectedPath().
|
noexcept |
Returns an unsafe const iterator pointing to the end of the List.
Unsafe const iterators are a little bit faster than safe const iterators and they consume less memory. However, if the element they point to is erased, their dereference or their increment/decrement will produce a mess, probably a segfault. You should use them only when performance is an issue and if you are sure that they will never point to an element erased.
Definition at line 1299 of file list_tpl.h.
References ListConstIterator< Val >.
|
noexcept |
Returns an unsafe iterator pointing to the end of the List.
Unsafe iterators are a little bit faster than safe iterators and they consume less memory. However, if the element they point to is erased, their dereference or their increment/decrement will produce a mess, probably a segfault. You should use them only when performance is an issue and if you are sure that they will never point to an element erased.
Definition at line 1293 of file list_tpl.h.
References ListIterator< Val >.
Referenced by map(), map(), and map().
|
noexcept |
Returns a safe iterator pointing to the end of the List.
Safe iterators are iterators whose state is updated by the list when the element they point to is erased. As such, in this case, they can throw an exception when we try to derefence them and they are able to perform a valid ++ or – step.
Ceturns a safe iterator pointing to the end of the List.
Definition at line 1281 of file list_tpl.h.
References ListIteratorSafe< Val >.
| void gum::List< Val >::erase | ( | const const_iterator_safe & | iter | ) |
Erases the element of the List pointed to by the safe const iterator.
If the element cannot be found, i.e., it has already been erased or the iterator points to end/rend, the function returns without throwing any exception. It runs in linear time in the size of the list.
| iter | An iterator pointing to the element to remove. |
Definition at line 1778 of file list_tpl.h.
References _erase_(), and gum::ListConstIteratorSafe< Val >::_getBucket_().
| void gum::List< Val >::erase | ( | const iterator_safe & | iter | ) |
Erases the element of the List pointed to by the safe iterator.
If the element cannot be found, i.e., it has already been erased or the iterator points to end/rend, the function returns without throwing any exception. It runs in linear time in the size of the list.
| iter | An iterator pointing to the element to remove. |
Definition at line 1772 of file list_tpl.h.
References _erase_(), and gum::ListConstIteratorSafe< Val >::_getBucket_().
Erases the ith element of the List (the first one is in position 0).
If the element cannot be found, the function returns without throwing any exception. It runs in linear time in the size of the list.
| i | The position in the list of the element we wish to remove. |
Definition at line 1763 of file list_tpl.h.
References _erase_(), _getIthBucket_(), and _nb_elements_.
Referenced by gum::prm::StructuredInference< GUM_SCALAR >::_reduceAloneInstances_().
| void gum::List< Val >::eraseAllVal | ( | const Val & | val | ) |
erases all the elements encountered with a given value
If no element equal to val can be found, the function returns without throwing any exception.
Comparisons between Val instances are performed through == operators.
| val | the value of the element we wish to remove. |
Definition at line 1799 of file list_tpl.h.
References _deb_list_, and _erase_().
| void gum::List< Val >::eraseByVal | ( | const Val & | val | ) |
erases the first element encountered with a given value.
If no element equal to val can be found, the function returns without throwing any exception. It runs in linear time both in the size of the list and in the number of iterators referenced in the list. Comparisons between Val instances are performed through == operators.
| val | The value of the element we wish to remove. |
Definition at line 1793 of file list_tpl.h.
References _erase_(), and _getBucket_().
Checks whether there exists a given element in the list.
This method runs in linear time.
Comparisons between Val instances are performed through == operators.
| val | the value of the element we wish to check the existence of. |
Definition at line 1716 of file list_tpl.h.
References _deb_list_, gum::ListBucket< Val >::_next_, and gum::ListBucket< Val >::_val_.
Referenced by gum::EssentialGraph::toDot(), gum::PDAG::toDot(), and gum::UndiGraph::toDot().
| Val & gum::List< Val >::front | ( | ) | const |
Returns a reference to first element of a list, if any.
| NotFound | exception is thrown if the list is empty. |
Definition at line 1694 of file list_tpl.h.
References _deb_list_, _nb_elements_, and GUM_ERROR.
Referenced by gum::graph::_bayesBall_(), gum::prm::SVE< GUM_SCALAR >::_eliminateNodes_(), gum::prm::SVED< GUM_SCALAR >::_eliminateNodes_(), gum::prm::SVED< GUM_SCALAR >::_eliminateNodesDownward_(), gum::learning::ConstraintBasedLearning::_existsDirectedPath_(), gum::learning::SimpleMiic::_existsDirectedPath_(), gum::MeekRules::_existsDirectedPath_(), gum::BarrenNodesFinder::barrenNodes(), gum::BarrenNodesFinder::barrenNodes(), gum::graph::directedPath(), gum::graph::directedUnorientedPath(), gum::InfluenceDiagram< GUM_SCALAR >::existsPathBetween(), gum::InfluenceDiagram< GUM_SCALAR >::getChildrenDecision_(), gum::graph::hasDirectedPath(), gum::graph::hasUndirectedCycle(), gum::graph::mixedOrientedPath(), gum::graph::mixedUnorientedPath(), gum::BayesBall::relevantTensors(), gum::dSeparationAlgorithm::relevantTensors(), gum::dSeparationAlgorithm::requisiteNodes(), gum::DAGCycleDetector::setDAG(), and gum::graph::undirectedPath().
| Val & gum::List< Val >::insert | ( | const const_iterator & | iter, |
| const Val & | val, | ||
| location | place = location::BEFORE ) |
Inserts a new element before or after a given iterator.
| iter | The iterator pointing where to inser the new element. |
| val | The value to insert. |
| place | Defines where to insert the new element relatively to iter. |
Definition at line 1667 of file list_tpl.h.
References _createBucket_(), and _insert_().
| Val & gum::List< Val >::insert | ( | const const_iterator & | iter, |
| Val && | val, | ||
| location | place = location::BEFORE ) |
Inserts an rvalue before or after a given iterator.
| iter | The iterator pointing where to inser the new element. |
| val | The value to insert. |
| place | Defines where to insert the new element relatively to iter. |
Definition at line 1674 of file list_tpl.h.
References _createBucket_(), and _insert_().
| Val & gum::List< Val >::insert | ( | const const_iterator_safe & | iter, |
| const Val & | val, | ||
| location | place = location::BEFORE ) |
Inserts a new element before or after a given iterator.
| iter | The iterator pointing where to inser the new element. |
| val | The value to insert. |
| place | Defines where to insert the new element relatively to iter. |
Definition at line 1643 of file list_tpl.h.
References _createBucket_(), _insert_(), gum::ListConstIteratorSafe< Val >::_list_, and GUM_ERROR.
| Val & gum::List< Val >::insert | ( | const const_iterator_safe & | iter, |
| Val && | val, | ||
| location | place = location::BEFORE ) |
Inserts an rvalue before or after a given iterator.
| iter | The iterator pointing where to inser the new element. |
| val | The value to insert. |
| place | Defines where to insert the new element relatively to iter. |
Definition at line 1655 of file list_tpl.h.
References _createBucket_(), _insert_(), gum::ListConstIteratorSafe< Val >::_list_, and GUM_ERROR.
| Val & gum::List< Val >::insert | ( | const Val & | val | ) |
Inserts a new element at the end of the chained list (alias of pushBack).
| val | The value inserted. |
Definition at line 1508 of file list_tpl.h.
References pushBack().
Referenced by gum::graph::_bayesBall_(), gum::prm::SVE< GUM_SCALAR >::_eliminateNodes_(), gum::prm::SVED< GUM_SCALAR >::_eliminateNodes_(), gum::prm::SVED< GUM_SCALAR >::_eliminateNodesDownward_(), gum::prm::SVE< GUM_SCALAR >::_eliminateNodesUpward_(), gum::prm::gspan::StrictSearch< GUM_SCALAR >::_elimination_cost_(), gum::credal::CNMonteCarloSampling< GUM_SCALAR, BNInferenceEngine >::_insertEvidence_(), gum::prm::StructuredInference< GUM_SCALAR >::_reduceAloneInstances_(), gum::BarrenNodesFinder::barrenNodes(), gum::BarrenNodesFinder::barrenNodes(), gum::BayesBall::relevantTensors(), gum::dSeparationAlgorithm::relevantTensors(), gum::dSeparationAlgorithm::requisiteNodes(), gum::DAGCycleDetector::setDAG(), gum::EssentialGraph::toDot(), gum::PDAG::toDot(), and gum::UndiGraph::toDot().
Inserts a new element at the ith pos of the chained list.
The first element of the list is at pos 0. After the insert, the element is placed precisely at pos if pos is less than the size of the list before insertion, else it is inserted at the end of the list.
| pos | The position where to inser the new element. |
| val | The value to insert. |
Definition at line 1568 of file list_tpl.h.
References _createBucket_(), _getIthBucket_(), _insertBefore_(), _nb_elements_, and pushBack().
Insert an rvalue at the ith pos of the chained list.
The first element of the list is at pos 0. After the insert, the element is placed precisely at pos if pos is less than the size of the list before insertion, else it is inserted at the end of the list.
| pos | The position where to inser the new element. |
| val | The value to insert. |
Definition at line 1577 of file list_tpl.h.
References _createBucket_(), _getIthBucket_(), _insertBefore_(), _nb_elements_, and pushBack().
| Val & gum::List< Val >::insert | ( | Val && | val | ) |
Inserts a new element at the end of the chained list (alias of pushBack).
| val | The value inserted. |
Definition at line 1514 of file list_tpl.h.
References pushBack().
| List< Mount > gum::List< Val >::map | ( | const Mount & | mount | ) | const |
Creates a list of mountains with a given value from a list of val.
| mount | the value taken by all the elements of the resulting list |
| Mount | The type of mountains. |
Definition at line 1892 of file list_tpl.h.
References List(), _nb_elements_, and pushBack().
| List< Mount > gum::List< Val >::map | ( | Mount(* | f )(const Val &) | ) | const |
Creates a list of mountains from a list of val.
| f | A function that maps any Val element into a Mount |
| Mount | The type of mountains. |
Definition at line 1877 of file list_tpl.h.
References List(), begin(), end(), and pushBack().
| List< Mount > gum::List< Val >::map | ( | Mount(* | f )(Val &) | ) | const |
Creates a list of mountains from a list of val.
| f | A function that maps any Val element into a Mount |
| Mount | The type of mountains. |
Definition at line 1862 of file list_tpl.h.
References List(), begin(), end(), and pushBack().
| List< Mount > gum::List< Val >::map | ( | Mount(* | f )(Val) | ) | const |
Creates a list of mountains from a list of val.
| f | A function that maps any Val element into a Mount |
| Mount | The type of mountains. |
Definition at line 1847 of file list_tpl.h.
References List(), begin(), end(), and pushBack().
Checks whether two lists are different (different elements or orders).
This method runs in time linear in the number of elements of the list.
Definition at line 1933 of file list_tpl.h.
References List(), and gum::operator==().
| Val & gum::List< Val >::operator+= | ( | const Val & | val | ) |
Inserts a new element at the end of the list (alias of pushBack).
This enables writing code like list += xxx; to add element xxx to the list.
| val | Tha value inserted int the list. |
Definition at line 1906 of file list_tpl.h.
References pushBack().
| Val & gum::List< Val >::operator+= | ( | Val && | val | ) |
Inserts a new element at the end of the list (alias of pushBack).
This enables writing code like list += xxx; to add element xxx to the list.
| val | Tha value inserted int the list. |
Definition at line 1913 of file list_tpl.h.
References pushBack().
Copy operator.
The new list and that which is copied do not share the elements: the new list contains new instances of the values stored in the list to be copied. Of course if these values are pointers, the new values point toward the same elements. The List on which the operator is applied keeps its iterator's list. Of course, if it previously contained some elements, those are removed prior to the copy. This operator runs in linear time.
| src | the list the content of which will be copied into the current List. |
Definition at line 1231 of file list_tpl.h.
References List().
Move operator.
| src | The gum::List to move. |
Definition at line 1249 of file list_tpl.h.
References List(), _deb_list_, _end_list_, _nb_elements_, _safe_iterators_, and clear().
Checks whether two lists are identical (same elements in the same order).
This method runs in time linear in the number of elements of the list.
Definition at line 1919 of file list_tpl.h.
References List(), _deb_list_, and _nb_elements_.
Returns the ith element in the current chained list.
The first of the list element has index 0.
This method runs in linear time.
| i | The position of the element in the list (0 = first element). |
| NotFound | Raised if the element to be retrieved does not exist. |
Definition at line 1939 of file list_tpl.h.
References _getIthBucket_(), _nb_elements_, and GUM_ERROR.
Returns the const ith element in the current chained list.
The first of the list element has index 0.
This method runs in linear time.
| i | the position of the element in the list (0 = first element). |
| NotFound | Raised if the element to be retrieved does not exist. |
Definition at line 1948 of file list_tpl.h.
References _getIthBucket_(), _nb_elements_, and GUM_ERROR.
| void gum::List< Val >::popBack | ( | ) |
Removes the last element of a List, if any.
When the list is empty, it does not do anything.
Definition at line 1810 of file list_tpl.h.
References _end_list_, and _erase_().
| void gum::List< Val >::popFront | ( | ) |
Removes the first element of a List, if any.
When the list is empty, it does not do anything.
Definition at line 1816 of file list_tpl.h.
References _deb_list_, and _erase_().
Referenced by gum::graph::_bayesBall_(), gum::prm::SVE< GUM_SCALAR >::_eliminateNodes_(), gum::prm::SVED< GUM_SCALAR >::_eliminateNodes_(), gum::prm::SVED< GUM_SCALAR >::_eliminateNodesDownward_(), gum::learning::ConstraintBasedLearning::_existsDirectedPath_(), gum::learning::SimpleMiic::_existsDirectedPath_(), gum::MeekRules::_existsDirectedPath_(), gum::BarrenNodesFinder::barrenNodes(), gum::BarrenNodesFinder::barrenNodes(), gum::graph::directedPath(), gum::graph::directedUnorientedPath(), gum::InfluenceDiagram< GUM_SCALAR >::existsPathBetween(), gum::InfluenceDiagram< GUM_SCALAR >::getChildrenDecision_(), gum::graph::hasDirectedPath(), gum::graph::hasUndirectedCycle(), gum::graph::mixedOrientedPath(), gum::graph::mixedUnorientedPath(), gum::BayesBall::relevantTensors(), gum::dSeparationAlgorithm::relevantTensors(), gum::dSeparationAlgorithm::requisiteNodes(), gum::DAGCycleDetector::setDAG(), and gum::graph::undirectedPath().
| Val & gum::List< Val >::push_back | ( | Args &&... | args | ) |
An alias for pushBack used for STL compliance.
Defining push_back allows using, for instance, BackInserters.
| Args | The emplace arguments type. |
| args | The emplace arguments values. |
Definition at line 1494 of file list_tpl.h.
References pushBack().
Referenced by gum::prm::SVE< GUM_SCALAR >::_initLiftedNodes_(), gum::prm::StructuredInference< GUM_SCALAR >::_reduceAloneInstances_(), gum::AggregatorDecomposition< GUM_SCALAR >::addDepthLayer_(), and gum::AggregatorDecomposition< GUM_SCALAR >::decomposeAggregator_().
| Val & gum::List< Val >::push_front | ( | Args &&... | args | ) |
An alias for pushFront used for STL compliance.
Defining push_front allows using, for instance, FrontInserters.
| Args | The emplace values type. |
| args | The emplace values. |
Definition at line 1468 of file list_tpl.h.
References pushFront().
| Val & gum::List< Val >::pushBack | ( | const Val & | val | ) |
Inserts a new element (a copy) at the end of the chained list.
The value passed in argument is not actually inserted into the list: this is a copy of this value that is inserted. The method runs in constant time.
| val | The value pushed back. |
Definition at line 1481 of file list_tpl.h.
References _createBucket_(), and _pushBack_().
Referenced by gum::learning::ConstraintBasedLearning::_existsDirectedPath_(), gum::learning::SimpleMiic::_existsDirectedPath_(), gum::MeekRules::_existsDirectedPath_(), gum::BayesNetFactory< GUM_SCALAR >::_fillProbaWithValuesTable_(), gum::prm::SVED< GUM_SCALAR >::_initLiftedNodes_(), gum::graph::directedPath(), gum::graph::directedUnorientedPath(), gum::InfluenceDiagram< GUM_SCALAR >::existsPathBetween(), gum::InfluenceDiagram< GUM_SCALAR >::getChildrenDecision_(), gum::graph::hasDirectedPath(), gum::graph::hasUndirectedCycle(), insert(), insert(), insert(), insert(), gum::Set< Key >::listMap(), map(), map(), map(), map(), gum::graph::mixedOrientedPath(), gum::graph::mixedUnorientedPath(), operator+=(), operator+=(), push_back(), and gum::graph::undirectedPath().
| Val & gum::List< Val >::pushBack | ( | Val && | val | ) |
Inserts a new element (a move) at the end of the chained list.
The value passed in argument is not actually inserted into the list: this is a copy of this value that is inserted. The method runs in constant time.
| val | The value pushed back. |
Definition at line 1487 of file list_tpl.h.
References _createBucket_(), and _pushBack_().
| Val & gum::List< Val >::pushFront | ( | const Val & | val | ) |
Inserts a new element (a copy) at the beginning of the chained list.
The value passed in argument is not actually inserted into the list: this is a copy of this value that is inserted. The method runs in constant time.
| val | The valus pushed at the front. |
Definition at line 1455 of file list_tpl.h.
References _createBucket_(), and _pushFront_().
Referenced by push_front().
| Val & gum::List< Val >::pushFront | ( | Val && | val | ) |
Inserts a new element (a move) at the beginning of the chained list.
| val | The valus pushed at the front. |
Definition at line 1461 of file list_tpl.h.
References _createBucket_(), and _pushFront_().
| ListIterator< Val > gum::List< Val >::rbegin | ( | ) |
Returns an unsafe iterator pointing to the last element of the List.
Unsafe iterators are a little bit faster than safe iterators and they consume less memory. However, if the element they point to is erased, their dereference or their increment/decrement will produce a mess, probably a segfault. You should use them only when performance is an issue and if you are sure that they will never point to an element erased.
Definition at line 1386 of file list_tpl.h.
References _nb_elements_, and ListIterator< Val >.
| ListConstIterator< Val > gum::List< Val >::rbegin | ( | ) | const |
Returns an unsafe const iterator pointing to the last element of the List.
Unsafe iterators are a little bit faster than safe iterators and they consume less memory. However, if the element they point to is erased, their dereference or their increment/decrement will produce a mess, probably a segfault. You should use them only when performance is an issue and if you are sure that they will never point to an element erased.
Definition at line 1393 of file list_tpl.h.
References _nb_elements_, and ListConstIterator< Val >.
| ListIteratorSafe< Val > gum::List< Val >::rbeginSafe | ( | ) |
Returns a safe iterator pointing to the last element of the List.
Safe iterators are iterators whose state is updated by the list when the element they point to is erased. As such, in this case, they can throw an exception when we try to derefence them and they are able to perform a valid ++ or – step.
Definition at line 1372 of file list_tpl.h.
References _nb_elements_, and ListIteratorSafe< Val >.
|
noexcept |
Returns an unsafe const iterator pointing just before the beginning of the List.
Unsafe const iterators are a little bit faster than safe const iterators and they consume less memory. However, if the element they point to is erased, their dereference or their increment/decrement will produce a mess, probably a segfault. You should use them only when performance is an issue and if you are sure that they will never point to an element erased.
Definition at line 1329 of file list_tpl.h.
References ListConstIterator< Val >.
|
noexcept |
Returns an unsafe iterator pointing just before the beginning of the List.
Unsafe iterators are a little bit faster than safe iterators and they consume less memory. However, if the element they point to is erased, their dereference or their increment/decrement will produce a mess, probably a segfault. You should use them only when performance is an issue and if you are sure that they will never point to an element erased.
Returns an unsafe iterator pointing just before the beginning of the List.
Definition at line 1323 of file list_tpl.h.
References ListIterator< Val >.
|
noexcept |
Returns a safe iterator pointing just before the beginning of the List.
Safe iterators are iterators whose state is updated by the list when the element they point to is erased. As such, in this case, they can throw an exception when we try to derefence them and they are able to perform a valid ++ or – step.
Definition at line 1311 of file list_tpl.h.
Returns the number of elements in the list.
This method runs in constant time.
Definition at line 1710 of file list_tpl.h.
References _nb_elements_.
Referenced by gum::BayesNetFactory< GUM_SCALAR >::_fillProbaWithValuesTable_(), gum::BayesNetFactory< GUM_SCALAR >::_increment_(), gum::credal::CNMonteCarloSampling< GUM_SCALAR, BNInferenceEngine >::_insertEvidence_(), and gum::prm::StructuredInference< GUM_SCALAR >::_reduceAloneInstances_().
Swap the current list with another one.
| other_list | The list to swap elements with. |
Definition at line 1957 of file list_tpl.h.
References List(), _deb_list_, _end_list_, _nb_elements_, and _safe_iterators_.
| std::string gum::List< Val >::toString | ( | ) | const |
Converts a list into a string.
Definition at line 1828 of file list_tpl.h.
References _deb_list_, gum::ListBucket< Val >::_next_, and gum::ListBucket< Val >::_val_.
Referenced by gum::operator<<().
|
friend |
|
friend |
ListIterator should be a friend to optimize access to elements.
Definition at line 1384 of file list.h.
Referenced by cbeginSafe(), cendSafe(), crbeginSafe(), and crendSafe().
|
friend |
|
friend |
ListIterator should be a friend to optimize access to elements.
Definition at line 1384 of file list.h.
Referenced by endSafe(), and rbeginSafe().
|
private |
A pointer on the first element of the chained list.
Definition at line 1253 of file list.h.
Referenced by List(), _erase_(), _getBucket_(), _getIthBucket_(), _insertBefore_(), _pushBack_(), _pushFront_(), clear(), eraseAllVal(), exists(), front(), gum::List< gum::Instantiation * >::map(), operator=(), operator==(), popFront(), swap(), and toString().
|
private |
A pointer on the last element of the chained list.
Definition at line 1256 of file list.h.
Referenced by _erase_(), _getIthBucket_(), _insertAfter_(), _pushBack_(), _pushFront_(), back(), clear(), operator=(), popBack(), and swap().
The number of elements in the list.
Definition at line 1259 of file list.h.
Referenced by gum::ListConstIterator< Val >::ListConstIterator(), _erase_(), _getIthBucket_(), _insertAfter_(), _insertBefore_(), _pushBack_(), _pushFront_(), back(), clear(), crbegin(), crbeginSafe(), empty(), erase(), front(), insert(), insert(), map(), operator=(), operator==(), operator[](), operator[](), rbegin(), rbegin(), rbeginSafe(), size(), and swap().
|
mutableprivate |