template class mrpt::math::CConstMatrixRowAccessor

A vector-like wrapper for a const Matrix for accessing the elements of a given row with a [] operator.

For usage with MRPT’s CMatrixDynamic only (for MRPT numeric matrices, use Eigen methods)

See also:

CConstMatrixColumnAccessor, CMatrixRowAccessorExtended, CMatrixRowAccessor, CConstMatrixRowAccessorExtended

#include <mrpt/math/matrix_adaptors.h>

template <class MAT>
class CConstMatrixRowAccessor
{
public:
    // typedefs

    typedef typename MAT::Scalar value_type;
    typedef CConstMatrixRowAccessor<MAT> mrpt_autotype;
    typedef detail::AccessorIterator<const CConstMatrixRowAccessor<MAT>, const value_type> const_iterator;
    typedef detail::ReverseAccessorIterator<const CConstMatrixRowAccessor<MAT>, const value_type> const_reverse_iterator;

    // construction

    CConstMatrixRowAccessor(
        const MAT& mat,
        size_t row
        );

    CConstMatrixRowAccessor();

    //
methods

    value_type operator [] (size_t i) const;
    const_iterator begin() const;
    const_iterator end() const;
    const_reverse_iterator rbegin() const;
    const_reverse_iterator rend() const;
    size_t size() const;
    void resize(size_t N);
};