template class mrpt::math::detail::AccessorIterator

Template class for matrix accessor’s iterators.

See also:

CMatrixRowAccessor, CMatrixColumnAccessor

#include <mrpt/math/matrix_adaptors.h>

template <typename A, typename T>
class AccessorIterator
{
public:
    // typedefs

    typedef std::random_access_iterator_tag iterator_category;
    typedef T value_type;
    typedef int difference_type;
    typedef T* pointer;
    typedef T& reference;

    // construction

    AccessorIterator(
        A& obj,
        size_t N
        );

    //
methods

    T& operator * () const;
    AccessorIterator<A, T>& operator ++ ();
    AccessorIterator<A, T> operator ++ (int);
    AccessorIterator<A, T>& operator -- ();
    AccessorIterator<A, T> operator -- (int);
    AccessorIterator<A, T>& operator += (int off);
    AccessorIterator<A, T> operator + (int off) const;
    AccessorIterator<A, T>& operator -= (int off);
    AccessorIterator<A, T> operator - (int off) const;
    int operator - (const AccessorIterator<A, T>& it) const;
    T& operator [] (int off) const;
    bool operator == (const AccessorIterator<A, T>& it) const;
    bool operator != (const AccessorIterator<A, T>& it) const;
};