golib
0.5
|
Vector iterator for multi-dimensional array data. More...
#include <gomatrix.h>
Public Member Functions | |
VectorIterator (T *ptr, goSize_t len, goPtrdiff_t stride, goPtrdiff_t increment) | |
Construct an iterator over data starting at ptr , of length len , using stride to get from one element to the next, and increment to get from one vector to the next. More... | |
VectorIterator (const VectorIterator< T > &other) | |
Copy constructor. More... | |
VectorIterator< T > & | operator= (const VectorIterator< T > &other) |
Copy operator. More... | |
goSize_t | len () const |
Length of a vector. More... | |
goPtrdiff_t | increment () const |
Increment to add to a pointer to get to the next vector. More... | |
VectorIterator< T > & | operator++ () |
Increment the iterator (move to the next vector). More... | |
VectorIterator< T > & | operator-- () |
Decrement the iterator (move to the previous vector). More... | |
Vector< T > & | operator* () |
Dereference operator. More... | |
Vector< T > * | operator-> () |
Pointer operator. More... | |
const Vector< T > & | operator* () const |
const Vector< T > * | operator-> () const |
bool | operator== (const VectorIterator< T > &other) |
Compares the actual pointers. More... | |
bool | operator!= (const VectorIterator< T > &other) |
Compares the actual pointers. More... | |
Vector iterator for multi-dimensional array data.
This class is used as goMath::Matrix::vector_iterator. It can be used to iterate over a number of vectors stored e.g. in a matrix.
T | Data type of the data. |
|
inline |
Construct an iterator over data starting at ptr
, of length len
, using stride
to get from one element to the next, and increment
to get from one vector to the next.
ptr | Start pointer. |
len | Length of a vector. |
stride | Stride within the vector (number of elements to add to the pointer in order to get to the next element). |
increment | Increment to get from one vector to the next, in elements. |
|
inline |
Copy constructor.
other | Iterator to be copied. |
|
inline |
Increment to add to a pointer to get to the next vector.
|
inline |
Length of a vector.
|
inline |
Compares the actual pointers.
other | Iterator to compare with. |
|
inline |
Dereference operator.
|
inline |
Increment the iterator (move to the next vector).
|
inline |
Decrement the iterator (move to the previous vector).
|
inline |
Pointer operator.
|
inline |
Copy operator.
other | Iterator to be copied. |
|
inline |
Compares the actual pointers.
other | Iterator to compare with. |