The random access iterator for the RWGenMat collection class.
More...
#include <rw/math/genmat.h>
template<class T>
class RWGenMatIterator< T >
Class RWGenMatIterator is the random access iterator for the RWGenMat collection class. The RWGenMatIterator class behaves like a pointer to type T
, and is used to increment through elements of an RWGenMat.
- Note
- This class should be accessed as the typedef RWGenMat::iterator.
- Example
#include <rw/math/genmat.h>
int main() {
for (int j = 0; i != stop; ++i, ++j) {
*i = j;
}
}
The random access iterator for the RWGenMat collection class.
Definition genmat.h:331
A templatized general matrix class.
Definition genmat.h:741
◆ RWGenMatIterator()
Constructs an iterator that is in an uninitialized state. The iterator must be initialized before it is dereferenced.
◆ operator*()
Returns a reference to the element pointed to by self.
◆ operator+()
◆ operator++() [1/2]
Prefix increment operator. The iterator points to the next element in the RWGenMat. No error condition is set if the iterator goes past the bounds of the matrix. Compare to RWGenMat::begin() and RWGenMat::end() to check that the iterator position is valid.
◆ operator++() [2/2]
Postfix increment operator. The iterator points to the next element in the RWGenMat. No error condition is set if the iterator goes past the bounds of the matrix. Compare to RWGenMat::begin() and RWGenMat::end() to check that the iterator position is valid.
◆ operator+=()
The RWGenMatIterator is moved forward d elements in the RWGenMat. No error condition is set if the iterator goes past the bounds of the matrix. Incrementing by d and then decrementing by d returns the iterator to its original position, even if doing so takes it past the bounds of the matrix.
◆ operator-() [1/2]
◆ operator-() [2/2]
◆ operator--() [1/2]
Prefix decrement operator. The iterator points to the previous element in the RWGenMat. No error condition is set if the iterator goes past the bounds of the matrix. Compare to RWGenMat::begin() and RWGenMat::end() to check that the iterator position is valid.
◆ operator--() [2/2]
Postfix decrement operator. The iterator points to the previous element in the RWGenMat. No error condition is set if the iterator goes past the bounds of the matrix. Compare to RWGenMat::begin() and RWGenMat::end() to check that the iterator position is valid.
◆ operator-=()
The RWGenMatIterator is moved backward d elements in the RWGenMat. No error condition is set if the iterator goes past the bounds of the matrix. Incrementing by d and then decrementing by d returns the iterator to its original position, even if doing so takes it past the bounds of the matrix.
◆ operator->()
For iterator a, and identifier m, a->m is equivalent to (*a).m.
◆ operator[]()
Returns a reference to the element n elements after self if n is positive, or n elements before n if n is negative.