![]() |
aGrUM
0.20.3
a C++ library for (probabilistic) graphical models
|
Unsafe iterators for bijection. More...
#include <agrum/tools/core/bijection.h>
Public Member Functions | |
template<typename Alloc , bool Gen> | |
INLINE | BijectionIterator (const BijectionImplementation< T1, T2, Alloc, Gen > &bijection) |
Constructor. More... | |
template<typename Alloc > | |
INLINE | BijectionIterator (const Bijection< T1, T2, Alloc > &bijection) |
Constructor. More... | |
Constructors/destructors | |
BijectionIterator () noexcept | |
Default constructor. More... | |
template<typename Alloc > | |
BijectionIterator (const Bijection< T1, T2, Alloc > &bijection) | |
Default constructor. More... | |
BijectionIterator (const BijectionIterator< T1, T2 > &from) | |
Copy constructor. More... | |
BijectionIterator (BijectionIterator< T1, T2 > &&from) noexcept | |
Move constructor. More... | |
~BijectionIterator () noexcept | |
Class destructor. More... | |
Operators | |
BijectionIterator< T1, T2 > & | operator= (const BijectionIterator< T1, T2 > &toCopy) |
Copy operator. More... | |
BijectionIterator< T1, T2 > & | operator= (BijectionIterator< T1, T2 > &&toMove) noexcept |
Move operator. More... | |
BijectionIterator< T1, T2 > & | operator++ () noexcept |
Go to the next association, if it exists. More... | |
BijectionIterator< T1, T2 > & | operator+= (Size nb) noexcept |
Moves the iterator by nb elements. More... | |
BijectionIterator< T1, T2 > | operator+ (Size nb) noexcept |
Return a new iterator. More... | |
bool | operator!= (const BijectionIterator< T1, T2 > &toCompare) const noexcept |
Inequality operator. More... | |
bool | operator== (const BijectionIterator< T1, T2 > &toCompare) const noexcept |
Equality operator. More... | |
Accessors/Modifiers | |
const T1 & | first () const |
Returns the first element of the current association. More... | |
const T2 & | second () const |
Returns the second element of the current association. More... | |
Public Types | |
using | iterator_category = std::forward_iterator_tag |
types for STL compliance More... | |
using | type1_type = T1 |
types for STL compliance More... | |
using | type1_reference = T1 & |
types for STL compliance More... | |
using | type1_const_reference = const T1 & |
types for STL compliance More... | |
using | type1_pointer = T1 * |
types for STL compliance More... | |
using | type1_const_pointer = const T1 * |
types for STL compliance More... | |
using | type2_type = T2 |
types for STL compliance More... | |
using | type2_reference = T2 & |
types for STL compliance More... | |
using | type2_const_reference = const T2 & |
types for STL compliance More... | |
using | type2_pointer = T2 * |
types for STL compliance More... | |
using | type2_const_pointer = const T2 * |
types for STL compliance More... | |
using | difference_type = std::ptrdiff_t |
types for STL compliance More... | |
Friends | |
template<typename TT1 , typename TT2 , typename Alloc , bool > | |
class | BijectionImplementation |
Unsafe iterators for bijection.
T1 | The first type of elements in the gum::Bjection. |
T2 | The second type of elements in the gum::Bjection. |
Definition at line 1593 of file bijection.h.
using gum::BijectionIterator< T1, T2 >::difference_type = std::ptrdiff_t |
types for STL compliance
Definition at line 1611 of file bijection.h.
|
private |
Dummy classes that will enable discriminate without overhead between scalars and non-scalars functions second in iterators.
Definition at line 1620 of file bijection.h.
|
private |
Definition at line 1760 of file bijection.h.
|
private |
Alias for one of the internal gum::HashTable of the gum::Bijection.
Definition at line 1759 of file bijection.h.
using gum::BijectionIterator< T1, T2 >::iterator_category = std::forward_iterator_tag |
types for STL compliance
Definition at line 1600 of file bijection.h.
using gum::BijectionIterator< T1, T2 >::type1_const_pointer = const T1* |
types for STL compliance
Definition at line 1605 of file bijection.h.
using gum::BijectionIterator< T1, T2 >::type1_const_reference = const T1& |
types for STL compliance
Definition at line 1603 of file bijection.h.
using gum::BijectionIterator< T1, T2 >::type1_pointer = T1* |
types for STL compliance
Definition at line 1604 of file bijection.h.
using gum::BijectionIterator< T1, T2 >::type1_reference = T1& |
types for STL compliance
Definition at line 1602 of file bijection.h.
using gum::BijectionIterator< T1, T2 >::type1_type = T1 |
types for STL compliance
Definition at line 1601 of file bijection.h.
using gum::BijectionIterator< T1, T2 >::type2_const_pointer = const T2* |
types for STL compliance
Definition at line 1610 of file bijection.h.
using gum::BijectionIterator< T1, T2 >::type2_const_reference = const T2& |
types for STL compliance
Definition at line 1608 of file bijection.h.
using gum::BijectionIterator< T1, T2 >::type2_pointer = T2* |
types for STL compliance
Definition at line 1609 of file bijection.h.
using gum::BijectionIterator< T1, T2 >::type2_reference = T2& |
types for STL compliance
Definition at line 1607 of file bijection.h.
using gum::BijectionIterator< T1, T2 >::type2_type = T2 |
types for STL compliance
Definition at line 1606 of file bijection.h.
|
private |
Begin constructor.
By default, the iterator points to the starting point of the bijection.
|
noexcept |
Default constructor.
Definition at line 994 of file bijection_tpl.h.
gum::BijectionIterator< T1, T2 >::BijectionIterator | ( | const Bijection< T1, T2, Alloc > & | bijection | ) |
Default constructor.
bijection | The gum::Bijection to iterate onto. |
INLINE gum::BijectionIterator< T1, T2 >::BijectionIterator | ( | const BijectionIterator< T1, T2 > & | from | ) |
Copy constructor.
from | The gum::BijectionIterator to copy. |
Definition at line 1018 of file bijection_tpl.h.
|
noexcept |
Move constructor.
move constructor
from | The gum::BijectionIterator to move. |
Definition at line 1025 of file bijection_tpl.h.
|
noexcept |
Class destructor.
Destructor.
Definition at line 1033 of file bijection_tpl.h.
INLINE gum::BijectionIterator< T1, T2 >::BijectionIterator | ( | const BijectionImplementation< T1, T2, Alloc, Gen > & | bijection | ) |
Constructor.
Definition at line 1001 of file bijection_tpl.h.
INLINE gum::BijectionIterator< T1, T2 >::BijectionIterator | ( | const Bijection< T1, T2, Alloc > & | bijection | ) |
Constructor.
Definition at line 1011 of file bijection_tpl.h.
INLINE const T1 & gum::BijectionIterator< T1, T2 >::first | ( | ) | const |
Returns the first element of the current association.
return the first element of the current association
UndefinedIteratorValue | Raised when the iterator does not point to a valid element of the bijection. |
Definition at line 1089 of file bijection_tpl.h.
|
noexcept |
Inequality operator.
Comparison of iterators.
toCompare | The gum::BijectionIteratorSafe to compare. |
Definition at line 1075 of file bijection_tpl.h.
|
noexcept |
Return a new iterator.
returns a new iterator
If the iterator points to gum::Bijection::end(), the resulting iterator also points to gum::Bijection::end(). If there are nb or fewer elements to parse to reach the end of the gum::Bijection, then the resulting iterator points to gum::Bijection::end().
Definition at line 1069 of file bijection_tpl.h.
|
noexcept |
Go to the next association, if it exists.
Go to the next association (if exists)
If the iterator points to gum::Bijection::end(), nothing is done.
Definition at line 1055 of file bijection_tpl.h.
|
noexcept |
Moves the iterator by nb elements.
moves the iterator by nb elements
If the iterator points to gum::Bijection::end(), nothing is done. If there are nb or fewer elements to parse to reach the end of the bijection, then this method makes the iterator point to gum::Bijection::end().
nb | The number of steps by wich the iterator moves. |
Definition at line 1062 of file bijection_tpl.h.
INLINE BijectionIterator< T1, T2 > & gum::BijectionIterator< T1, T2 >::operator= | ( | const BijectionIterator< T1, T2 > & | toCopy | ) |
Copy operator.
toCopy | The gum::BijectionIterator to copy. |
Definition at line 1040 of file bijection_tpl.h.
|
noexcept |
Move operator.
move operator
toMove | The gum::BijectionIterator to move. |
Definition at line 1048 of file bijection_tpl.h.
|
noexcept |
Equality operator.
Comparison of iterators.
toCompare | The gum::BijectionIteratorSafe to compare. |
Definition at line 1082 of file bijection_tpl.h.
INLINE const T2 & gum::BijectionIterator< T1, T2 >::second | ( | ) | const |
Returns the second element of the current association.
return the second element of the current association
UndefinedIteratorValue | Raised when the iterator does not point to a valid element of the bijection. |
Definition at line 1095 of file bijection_tpl.h.
|
friend |
Definition at line 1595 of file bijection.h.
|
private |
The hashTable iterator that actually does all the job.
Definition at line 1763 of file bijection.h.