![]() |
Iterator over the elements of the sparse subvector. More...
#include <SparseSubvector.h>
Public Types | |
typedef std::forward_iterator_tag | IteratorCategory |
The iterator category. | |
typedef SubvectorElement< VectorType, IteratorType > | ValueType |
Type of the underlying elements. | |
typedef ValueType | PointerType |
Pointer return type. | |
typedef ValueType | ReferenceType |
Reference return type. | |
typedef ptrdiff_t | DifferenceType |
Difference between two iterators. | |
typedef IteratorCategory | iterator_category |
The iterator category. | |
typedef ValueType | value_type |
Type of the underlying elements. | |
typedef PointerType | pointer |
Pointer return type. | |
typedef ReferenceType | reference |
Reference return type. | |
typedef DifferenceType | difference_type |
Difference between two iterators. | |
Public Member Functions | |
SubvectorIterator () | |
Default constructor for the SubvectorIterator class. | |
SubvectorIterator (IteratorType iterator, size_t index) | |
Constructor for the SubvectorIterator class. More... | |
template<typename VectorType2 , typename IteratorType2 > | |
SubvectorIterator (const SubvectorIterator< VectorType2, IteratorType2 > &it) | |
Conversion constructor from different SubvectorIterator instances. More... | |
SubvectorIterator & | operator++ () |
Pre-increment operator. More... | |
const SubvectorIterator | operator++ (int) |
Post-increment operator. More... | |
ReferenceType | operator* () const |
Direct access to the current sparse subvector element. More... | |
PointerType | operator-> () const |
Direct access to the current sparse subvector element. More... | |
template<typename VectorType2 , typename IteratorType2 > | |
bool | operator== (const SubvectorIterator< VectorType2, IteratorType2 > &rhs) const |
Equality comparison between two SubvectorIterator objects. More... | |
template<typename VectorType2 , typename IteratorType2 > | |
bool | operator!= (const SubvectorIterator< VectorType2, IteratorType2 > &rhs) const |
Inequality comparison between two SubvectorIterator objects. More... | |
DifferenceType | operator- (const SubvectorIterator &rhs) const |
Calculating the number of elements between two subvector iterators. More... | |
IteratorType | base () const |
Access to the current position of the subvector iterator. More... | |
size_t | offset () const |
Access to the offset of the subvector iterator. More... | |
Private Attributes | |
IteratorType | pos_ |
Iterator to the current sparse element. | |
size_t | offset_ |
The offset of the subvector within the sparse vector. | |
Iterator over the elements of the sparse subvector.
|
inline |
Constructor for the SubvectorIterator class.
iterator | Iterator to the current sparse element. |
index | The starting index of the subvector within the sparse vector. |
|
inline |
Conversion constructor from different SubvectorIterator instances.
it | The subvector iterator to be copied. |
|
inline |
Access to the current position of the subvector iterator.
|
inline |
Access to the offset of the subvector iterator.
|
inline |
Inequality comparison between two SubvectorIterator objects.
rhs | The right-hand side subvector iterator. |
|
inline |
Direct access to the current sparse subvector element.
|
inline |
Pre-increment operator.
|
inline |
Post-increment operator.
|
inline |
Calculating the number of elements between two subvector iterators.
rhs | The right-hand side subvector iterator. |
|
inline |
Direct access to the current sparse subvector element.
|
inline |
Equality comparison between two SubvectorIterator objects.
rhs | The right-hand side subvector iterator. |