9 #ifndef mrpt_matrix_adaptors_H 10 #define mrpt_matrix_adaptors_H 20 template <
typename T,
typename U,
bool UIsObject>
21 class CBinaryRelation;
29 template <
typename U,
bool B>
46 template <
typename T,
typename U,
bool UIsObject,
typename FunctionType>
49 const T& T1,
const T& T2);
57 template <
typename A,
typename T>
136 template <
typename A,
typename T>
220 template <
typename MAT>
276 throw std::logic_error(
"Tried to resize a fixed-size vector");
279 template <
typename MAT>
306 MAT& mat,
size_t row,
size_t offset,
size_t space)
353 throw std::logic_error(
"Tried to resize a fixed-size vector");
356 template <
typename MAT>
358 MAT& m,
size_t rowIdx,
size_t offset,
size_t space = 1)
411 throw std::logic_error(
"Tried to resize a fixed-size vector");
414 template <
typename MAT>
441 const MAT& mat,
size_t row,
size_t offset,
size_t space)
473 throw std::logic_error(
"Tried to resize a fixed-size vector");
476 template <
typename MAT>
478 const MAT& m,
size_t rowIdx,
size_t offset,
size_t space = 1)
488 template <
typename MAT>
544 throw std::logic_error(
"Tried to resize a fixed-size vector");
547 template <
typename MAT>
558 template <
typename MAT>
572 MAT& mat,
size_t col,
size_t offset,
size_t space)
619 throw std::logic_error(
"Tried to resize a fixed-size vector");
622 template <
typename MAT>
624 MAT& m,
size_t colIdx,
size_t offset,
size_t space = 1)
675 throw std::logic_error(
"Tried to resize a fixed-size vector");
678 template <
typename MAT>
680 const MAT& m,
size_t colIdx)
690 template <
typename MAT>
704 const MAT& mat,
size_t col,
size_t offset,
size_t space)
736 throw std::logic_error(
"Tried to resize a fixed-size vector");
739 template <
typename MAT>
741 const MAT& m,
size_t colIdx,
size_t offset,
size_t space = 1)
detail::ReverseAccessorIterator< const CConstMatrixRowAccessor< MAT >, const value_type > const_reverse_iterator
bool operator==(const AccessorIterator< A, T > &it) const
CConstMatrixRowAccessor()
A vector-like wrapper for a const Matrix for accessing the elements of a given column with a [] opera...
void applyFunction(CBinaryRelation< T, U, UIsObject > &o, FunctionType fun, size_t e1, size_t e2, const T &T1, const T &T2)
const_iterator begin() const
detail::AccessorIterator< CMatrixRowAccessorExtended< MAT >, value_type > iterator
value_type & operator[](size_t i)
CMatrixColumnAccessor(MAT &mat, size_t colIdx)
This template is a trick to switch the type of a variable using a boolean variable in the template...
CMatrixRowAccessorExtended()
CConstMatrixRowAccessorExtended(const MAT &mat, size_t row, size_t offset, size_t space)
const_reverse_iterator rbegin() const
detail::ReverseAccessorIterator< const CMatrixRowAccessorExtended< MAT >, const value_type > const_reverse_iterator
const_reverse_iterator rbegin() const
const_reverse_iterator rbegin() const
typename MAT::Scalar value_type
ReverseAccessorIterator(A &obj, size_t N)
value_type operator[](const size_t i) const
reverse_iterator rbegin()
detail::ReverseAccessorIterator< CMatrixRowAccessorExtended< MAT >, value_type > reverse_iterator
int operator-(const AccessorIterator< A, T > &it) const
const_reverse_iterator rbegin() const
value_type & operator[](const size_t i)
const_reverse_iterator rend() const
A vector-like wrapper for a const Matrix for accessing the elements of a given row with a [] operator...
detail::AccessorIterator< CMatrixColumnAccessor< MAT >, value_type > iterator
A vector-like wrapper for a Matrix for accessing the elements of a given column with a [] operator...
const_iterator end() const
const_iterator begin() const
detail::ReverseAccessorIterator< CMatrixColumnAccessor< MAT >, value_type > reverse_iterator
AccessorIterator< A, T > operator++(int)
detail::ReverseAccessorIterator< const CConstMatrixColumnAccessorExtended< MAT >, const value_type > const_reverse_iterator
This class models a binary relation through the elements of any given set.
ReverseAccessorIterator< A, T > operator--(int)
detail::AccessorIterator< const CMatrixRowAccessorExtended< MAT >, const value_type > const_iterator
ReverseAccessorIterator< A, T > operator++(int)
std::random_access_iterator_tag iterator_category
const_iterator begin() const
AccessorIterator< A, T > & operator+=(int off)
detail::AccessorIterator< const CConstMatrixColumnAccessorExtended< MAT >, const value_type > const_iterator
const_iterator begin() const
GLsizei GLsizei GLuint * obj
typename MAT::Scalar value_type
value_type operator[](size_t i) const
const_reverse_iterator rbegin() const
const_iterator end() const
const_iterator begin() const
const_reverse_iterator rend() const
A vector-like wrapper for a Matrix for accessing the elements of a given row with a [] operator...
typename MAT::Scalar value_type
const_reverse_iterator rend() const
#define ASSERT_(f)
Defines an assertion mechanism.
const_reverse_iterator rbegin() const
CMatrixRowAccessor< MAT > getRowAccessor(MAT &m, size_t rowIdx)
AccessorIterator< A, T > & operator--()
const_reverse_iterator rend() const
A vector-like wrapper for a const Matrix for accessing the elements of a given row with a [] operator...
CMatrixRowAccessorExtended(MAT &mat, size_t row, size_t offset, size_t space)
const_reverse_iterator rbegin() const
T & operator[](int off) const
int operator-(const ReverseAccessorIterator< A, T > &it) const
typename MAT::Scalar value_type
value_type operator[](size_t i) const
bool operator!=(const AccessorIterator< A, T > &it) const
detail::ReverseAccessorIterator< const CConstMatrixRowAccessorExtended< MAT >, const value_type > const_reverse_iterator
detail::AccessorIterator< const CConstMatrixRowAccessor< MAT >, const value_type > const_iterator
const_iterator begin() const
detail::ReverseAccessorIterator< CMatrixRowAccessor< MAT >, value_type > reverse_iterator
AccessorIterator< A, T > operator-(int off) const
bool operator!=(const ReverseAccessorIterator< A, T > &it) const
ReverseAccessorIterator< A, T > & operator+=(int off)
value_type operator[](size_t i) const
typename MAT::Scalar value_type
detail::ReverseAccessorIterator< const CMatrixRowAccessor< MAT >, const value_type > const_reverse_iterator
CConstMatrixColumnAccessorExtended(const MAT &mat, size_t col, size_t offset, size_t space)
A vector-like wrapper for a Matrix for accessing the elements of a given row with a [] operator...
reverse_iterator rbegin()
detail::AccessorIterator< CMatrixRowAccessor< MAT >, value_type > iterator
reverse_iterator rbegin()
const_iterator begin() const
value_type operator[](size_t i) const
ReverseAccessorIterator< A, T > & operator++()
ReverseAccessorIterator< A, T > & operator--()
CConstMatrixRowAccessor(const MAT &mat, size_t row)
const_iterator begin() const
detail::ReverseAccessorIterator< CMatrixColumnAccessorExtended< MAT >, value_type > reverse_iterator
CConstMatrixColumnAccessor(const MAT &mat, size_t colIdx)
CConstMatrixColumnAccessor()
This template class provides the basic functionality for a general 2D any-size, resizable container o...
detail::ReverseAccessorIterator< const CMatrixColumnAccessorExtended< MAT >, const value_type > const_reverse_iterator
const_iterator end() const
typename MAT::Scalar value_type
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
const_reverse_iterator rend() const
typename MAT::Scalar value_type
typename MAT::Scalar value_type
Template class for matrix accessor's iterators.
T & operator[](int off) const
AccessorIterator< A, T > & operator++()
const_reverse_iterator rend() const
GLenum GLenum GLvoid * row
CMatrixColumnAccessor< MAT > getColumnAccessor(MAT &m, size_t colIdx)
detail::AccessorIterator< const CMatrixRowAccessor< MAT >, const value_type > const_iterator
const_iterator end() const
AccessorIterator< A, T > operator-(int off) const
value_type operator[](size_t i) const
const_reverse_iterator rbegin() const
detail::ReverseAccessorIterator< const CMatrixColumnAccessor< MAT >, const value_type > const_reverse_iterator
value_type & operator[](const size_t i)
ReverseAccessorIterator< A, T > operator+(int off) const
AccessorIterator(A &obj, size_t N)
CMatrixColumnAccessorExtended(MAT &mat, size_t col, size_t offset, size_t space)
AccessorIterator< A, T > operator+(int off) const
CConstMatrixRowAccessorExtended()
const_iterator end() const
detail::ReverseAccessorIterator< const CConstMatrixColumnAccessor< MAT >, const value_type > const_reverse_iterator
CConstMatrixColumnAccessorExtended()
const_reverse_iterator rend() const
Template class for matrix accessor's iterators.
detail::AccessorIterator< const CConstMatrixRowAccessorExtended< MAT >, const value_type > const_iterator
value_type operator[](size_t i) const
CMatrixColumnAccessorExtended()
AccessorIterator< A, T > operator--(int)
detail::AccessorIterator< const CMatrixColumnAccessorExtended< MAT >, const value_type > const_iterator
detail::AccessorIterator< const CConstMatrixColumnAccessor< MAT >, const value_type > const_iterator
const_reverse_iterator rend() const
const_iterator end() const
AccessorIterator< A, T > & operator-=(int off)
A vector-like wrapper for a Matrix for accessing the elements of a given column with a [] operator...
reverse_iterator rbegin()
const Scalar * const_iterator
This template class extends the class "CMatrixTemplate" for storing "objects" at each matrix entry...
const_iterator end() const
AccessorIterator< A, T > & operator-=(int off)
detail::AccessorIterator< CMatrixColumnAccessorExtended< MAT >, value_type > iterator
const_iterator end() const
detail::AccessorIterator< const CMatrixColumnAccessor< MAT >, const value_type > const_iterator
bool operator==(const ReverseAccessorIterator< A, T > &it) const
value_type operator[](const size_t i) const
value_type & operator[](size_t i)
CMatrixRowAccessor(MAT &mat, size_t rowIdx)
std::random_access_iterator_tag iterator_category
A vector-like wrapper for a const Matrix for accessing the elements of a given column with a [] opera...