ALP User Documentation 0.7.0
Algebraic Programming User Documentation
|
A standard iterator for an ALP/GraphBLAS matrix. More...
#include <matrix.hpp>
Inherits iterator< std::forward_iterator_tag, std::pair< std::pair< const size_t, const size_t >, const D >, size_t >.
Public Member Functions | |
bool | operator!= (const const_iterator &other) const |
std::pair< const size_t, const D > | operator* () const |
Dereferences the current position of this iterator. More... | |
const_iterator & | operator++ () |
Advances the position of this iterator by one. More... | |
bool | operator== (const const_iterator &other) const |
Standard equals operator. More... | |
A standard iterator for an ALP/GraphBLAS matrix.
This iterator is used for data extraction only. Hence only this const version is specified.
Dereferencing an iterator of this type that is not in end position yields a pair \( (c,v) \). The value v is of type D and corresponds to the value of the dereferenced nonzero.
The value c is another pair \( (i,j) \). The values i and j are of type size_t
and correspond to the coordinate of the dereferenced nonzero.
std::pair
.In terms of STL, the returned iterator is an forward iterator. Its performance semantics match that defined by the STL. Backends are encouraged to specify additional performance semantics as long as they do not conflict with those of a forward iterator.
Backends are allowed to return bi-directional or random access iterators instead of forward iterators.
|
inline |
|
inline |
Dereferences the current position of this iterator.
size_t
.
|
inline |
Advances the position of this iterator by one.
If the current position corresponds to the last element in the container, the new position of this iterator will be its end position.
If the current position of this iterator is already the end position, this iterator will become invalid; any use of invalid iterators will lead to undefined behaviour.
|
inline |
Standard equals operator.