![]() |
aGrUM
0.16.0
|
The iterators for IdSets. More...
#include <agrum/learning/scores_and_tests/idSet.h>
Public Member Functions | |
Constructors / Destructors | |
IdSetIterator () | |
default constructor More... | |
IdSetIterator (const IdSet< ALLOC > &idset) | |
Constructor for a begin. More... | |
IdSetIterator (const IdSetIterator< ALLOC > &from) | |
Copy constructor. More... | |
IdSetIterator (IdSetIterator< ALLOC > &&from) | |
move constructor More... | |
virtual | ~IdSetIterator () |
destructor More... | |
Operators | |
IdSetIterator< ALLOC > & | operator= (const IdSetIterator< ALLOC > &from) |
copy operator More... | |
IdSetIterator< ALLOC > & | operator= (IdSetIterator< ALLOC > &&from) |
move operator More... | |
NodeId | operator* () const |
Gives access to the content of the iterator. More... | |
bool | operator!= (const IdSetIterator< ALLOC > &from) const |
Checks whether two iterators point toward different elements. More... | |
bool | operator== (const IdSetIterator< ALLOC > &from) const |
Checks whether two iterators point toward the same elements. More... | |
IdSetIterator< ALLOC > & | operator++ () |
Makes the iterator point to the next element in the IdSet. More... | |
IdSetIterator< ALLOC > & | operator+= (const std::size_t i) |
Makes the iterator point to i elements further in the IdSet. More... | |
IdSetIterator< ALLOC > | operator+ (const std::size_t i) |
Returns a new iterator pointing to i further elements in the IdSet. More... | |
Accessors / Modifiers | |
std::size_t | pos () const |
Returns the position of the iterator in the IdSet. More... | |
Public Types | |
using | iterator_category = std::forward_iterator_tag |
types for STL compliance More... | |
using | value_type = NodeId |
types for STL compliance More... | |
using | reference = NodeId & |
types for STL compliance More... | |
using | const_reference = const NodeId & |
types for STL compliance More... | |
using | pointer = NodeId * |
types for STL compliance More... | |
using | const_pointer = const NodeId * |
types for STL compliance More... | |
using | difference_type = std::ptrdiff_t |
types for STL compliance More... | |
The iterators for IdSets.
using gum::learning::IdSetIterator< ALLOC >::const_pointer = const NodeId* |
using gum::learning::IdSetIterator< ALLOC >::const_reference = const NodeId& |
using gum::learning::IdSetIterator< ALLOC >::difference_type = std::ptrdiff_t |
using gum::learning::IdSetIterator< ALLOC >::iterator_category = std::forward_iterator_tag |
using gum::learning::IdSetIterator< ALLOC >::pointer = NodeId* |
using gum::learning::IdSetIterator< ALLOC >::reference = NodeId& |
using gum::learning::IdSetIterator< ALLOC >::value_type = NodeId |
gum::learning::IdSetIterator< ALLOC >::IdSetIterator | ( | ) |
default constructor
gum::learning::IdSetIterator< ALLOC >::IdSetIterator | ( | const IdSet< ALLOC > & | idset | ) |
Constructor for a begin.
idset | The IdSet to iterate over. |
gum::learning::IdSetIterator< ALLOC >::IdSetIterator | ( | const IdSetIterator< ALLOC > & | from | ) |
Copy constructor.
gum::learning::IdSetIterator< ALLOC >::IdSetIterator | ( | IdSetIterator< ALLOC > && | from | ) |
move constructor
|
virtual |
destructor
bool gum::learning::IdSetIterator< ALLOC >::operator!= | ( | const IdSetIterator< ALLOC > & | from | ) | const |
Checks whether two iterators point toward different elements.
NodeId gum::learning::IdSetIterator< ALLOC >::operator* | ( | ) | const |
Gives access to the content of the iterator.
UndefinedIteratorValue | Raised if the iterator points to nothing. |
IdSetIterator< ALLOC > gum::learning::IdSetIterator< ALLOC >::operator+ | ( | const std::size_t | i | ) |
Returns a new iterator pointing to i further elements in the IdSet.
i | The number of steps to move the iterator. |
IdSetIterator< ALLOC >& gum::learning::IdSetIterator< ALLOC >::operator++ | ( | ) |
IdSetIterator< ALLOC >& gum::learning::IdSetIterator< ALLOC >::operator+= | ( | const std::size_t | i | ) |
Makes the iterator point to i elements further in the IdSet.
i | The number of steps to move the iterator. |
IdSetIterator< ALLOC >& gum::learning::IdSetIterator< ALLOC >::operator= | ( | const IdSetIterator< ALLOC > & | from | ) |
copy operator
IdSetIterator< ALLOC >& gum::learning::IdSetIterator< ALLOC >::operator= | ( | IdSetIterator< ALLOC > && | from | ) |
move operator
bool gum::learning::IdSetIterator< ALLOC >::operator== | ( | const IdSetIterator< ALLOC > & | from | ) | const |
Checks whether two iterators point toward the same elements.
std::size_t gum::learning::IdSetIterator< ALLOC >::pos | ( | ) | const |
Returns the position of the iterator in the IdSet.
UndefinedIteratorValue | Raised on end() |