template class mrpt::math::CConstMatrixColumnAccessorΒΆ

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

See also:

CConstMatrixRowAccessor, CMatrixColumnAccessorExtended, CMatrixColumnAccessor, CConstMatrixColumnAccessorExtended

#include <mrpt/math/matrix_adaptors.h>

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

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

    // construction

    CConstMatrixColumnAccessor(
        const MAT& mat,
        size_t colIdx
        );

    CConstMatrixColumnAccessor();

    //
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);
};