![]() |
aGrUM 2.3.2
a C++ library for (probabilistic) graphical models
|
Bucket for a chained list. More...
#include <agrum/base/core/list.h>
Public Member Functions | |
| template<typename... Args> | |
| INLINE | ListBucket (typename ListBucket< Val >::Emplace, Args &&... args) |
Constructors / Destructors | |
| ListBucket ()=delete | |
| Removes empty constructor. | |
| ListBucket (const Val &v) | |
| Default constructor. | |
| ListBucket (Val &&v) noexcept | |
| Constructor for Val rvalues. | |
| template<typename... Args> | |
| ListBucket (Emplace, Args &&... args) | |
| Emplace (universal) constructor. | |
| ListBucket (const ListBucket< Val > &src) | |
| Copy constructor. | |
| ListBucket (ListBucket< Val > &&src)=delete | |
| Move constructor should be useless. | |
| ~ListBucket () | |
| Class destructor. | |
Operators | |
| ListBucket< Val > & | operator= (const ListBucket< Val > &src) |
| Copy operator. | |
| ListBucket< Val > & | operator= (ListBucket< Val > &&src)=delete |
| Move operator. | |
| bool | operator== (const ListBucket< Val > &src) const |
| Equality check. | |
| bool | operator!= (const ListBucket< Val > &src) const |
| Inequality check. | |
Accessors / Modifiers | |
| Val & | operator* () noexcept |
| Dereferencing operator. | |
| const Val & | operator* () const noexcept |
| Dereferencing operator. | |
| const ListBucket< Val > * | next () const noexcept |
| Returns the bucket toward the next element. | |
| const ListBucket< Val > * | previous () const noexcept |
| Returns the bucket toward the preceding element. | |
Private Types | |
| enum class | Emplace { EMPLACE } |
| C dummy type for the emplace constructor. More... | |
Private Attributes | |
| Val | _val_ |
| Val is the value contained in the box. | |
| ListBucket< Val > * | _prev_ {nullptr} |
| Chaining toward the adjacent elements. | |
| ListBucket< Val > * | _next_ {nullptr} |
| Chaining toward the adjacent elements. | |
Friends | |
| class | List< Val > |
| All the list containers and iterators should be able to access the buckets. | |
| class | ListIterator< Val > |
| class | ListConstIterator< Val > |
| class | ListIteratorSafe< Val > |
| class | ListConstIteratorSafe< Val > |
Bucket for a chained list.
In aGrUM, each box of a chained list is called a bucket. Lists are doubly linked bucket lists so as to enable efficient rbegin/rend iterators.
| Val | The values type stored in the gum::ListBucket. |
|
strongprivate |
|
delete |
Removes empty constructor.
Referenced by ListBucket(), ListBucket(), ListBucket(), ListBucket(), ~ListBucket(), List< Val >, next(), operator!=(), operator=(), operator=(), operator==(), and previous().
|
explicit |
Default constructor.
| v | The value stored in the gum::ListBucket. |
Definition at line 63 of file list_tpl.h.
References ListBucket(), and _val_.
|
explicitnoexcept |
Constructor for Val rvalues.
| v | The value stored in the gum::ListBucket. |
Definition at line 70 of file list_tpl.h.
References _val_.
|
explicit |
Emplace (universal) constructor.
| Args | The emplace values type. |
| args | The emplace values. |
References ListBucket().
| INLINE gum::ListBucket< Val >::ListBucket | ( | const ListBucket< Val > & | src | ) |
Copy constructor.
| src | The gum::ListBucket to copy. |
Definition at line 86 of file list_tpl.h.
References ListBucket(), and _val_.
|
delete |
Move constructor should be useless.
| src | The gum::ListBucket to move. |
References ListBucket().
| INLINE gum::ListBucket< Val >::~ListBucket | ( | ) |
Class destructor.
Definition at line 105 of file list_tpl.h.
References ListBucket().
| INLINE gum::ListBucket< Val >::ListBucket | ( | typename ListBucket< Val >::Emplace | , |
| Args &&... | args ) |
Definition at line 78 of file list_tpl.h.
|
noexcept |
Returns the bucket toward the next element.
Definition at line 136 of file list_tpl.h.
References ListBucket(), and _next_.
Referenced by operator=().
| INLINE bool gum::ListBucket< Val >::operator!= | ( | const ListBucket< Val > & | src | ) | const |
Inequality check.
| src | The gum::ListBucket to test for inequality. |
Definition at line 118 of file list_tpl.h.
References ListBucket(), and _val_.
|
noexcept |
Dereferencing operator.
Definition at line 124 of file list_tpl.h.
References _val_.
|
noexcept |
Dereferencing operator.
Definition at line 130 of file list_tpl.h.
References _val_.
| INLINE ListBucket< Val > & gum::ListBucket< Val >::operator= | ( | const ListBucket< Val > & | src | ) |
Copy operator.
| src | The gum::ListBucket to copy. |
Definition at line 93 of file list_tpl.h.
References ListBucket(), and _val_.
|
delete |
Move operator.
| src | The gum::ListBucket to move. |
References ListBucket(), and next().
| INLINE bool gum::ListBucket< Val >::operator== | ( | const ListBucket< Val > & | src | ) | const |
Equality check.
| src | The gum::ListBucket to test for equality. |
Definition at line 112 of file list_tpl.h.
References ListBucket(), and _val_.
|
noexcept |
Returns the bucket toward the preceding element.
Definition at line 142 of file list_tpl.h.
References ListBucket(), and _prev_.
Referenced by List< Val >.
All the list containers and iterators should be able to access the buckets.
Definition at line 237 of file list.h.
References ListBucket(), and previous().
|
friend |
|
friend |
|
friend |
|
friend |
|
private |
Chaining toward the adjacent elements.
Definition at line 253 of file list.h.
Referenced by gum::List< Val >::_copy_elements_(), gum::List< Val >::_erase_(), gum::List< Val >::_getIthBucket_(), gum::List< Val >::_insertAfter_(), gum::List< Val >::_insertBefore_(), gum::List< Val >::_pushFront_(), and next().
|
private |
Chaining toward the adjacent elements.
Definition at line 252 of file list.h.
Referenced by gum::List< Val >::_copy_elements_(), gum::List< Val >::_erase_(), gum::List< Val >::_getIthBucket_(), gum::List< Val >::_insertAfter_(), gum::List< Val >::_insertBefore_(), gum::List< Val >::_pushBack_(), and previous().
|
private |
Val is the value contained in the box.
Definition at line 257 of file list.h.
Referenced by ListBucket(), ListBucket(), ListBucket(), gum::List< Val >::_insertAfter_(), gum::List< Val >::_insertBefore_(), gum::List< Val >::_pushBack_(), gum::List< Val >::_pushFront_(), operator!=(), operator*(), operator*(), operator=(), and operator==().