9 #ifndef mrpt_matrix_adaptors_H 10 #define mrpt_matrix_adaptors_H 22 template<
typename T,
typename U,
bool UIsObject>
class CBinaryRelation;
41 template<
typename T,
typename U,
bool UIsObject,
typename FunctionType>
inline void applyFunction(
CBinaryRelation<T,U,UIsObject> &o, FunctionType fun,
size_t e1,
size_t e2,
const T &T1,
const T &T2);
190 template <
typename MAT>
232 return m_mat->getColCount();
235 if (N!=
size())
throw std::logic_error(
"Tried to resize a fixed-size vector");
300 if (N!=
size())
throw std::logic_error(
"Tried to resize a fixed-size vector");
341 return m_mat->getColCount();
344 if (N!=
size())
throw std::logic_error(
"Tried to resize a fixed-size vector");
392 if (N!=
size())
throw std::logic_error(
"Tried to resize a fixed-size vector");
443 return m_mat->getRowCount();
446 if (N!=
size())
throw std::logic_error(
"Tried to resize a fixed-size vector");
456 template<
typename MAT>
468 ASSERT_(col<mat.getColCount());
510 if (N!=
size())
throw std::logic_error(
"Tried to resize a fixed-size vector");
529 ASSERT_(colIdx<mat.getColCount());
550 return m_mat->getRowCount();
553 if (N!=
size())
throw std::logic_error(
"Tried to resize a fixed-size vector");
563 template<
typename MAT>
575 ASSERT_(col<mat.getColCount());
600 if (N!=
size())
throw std::logic_error(
"Tried to resize a fixed-size vector");
CMatrixColumnAccessor< MAT > mrpt_autotype
CMatrixColumnAccessorExtended< MAT > mrpt_autotype
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
CMatrixRowAccessor< MAT > mrpt_autotype
value_type & operator[](size_t i)
detail::ReverseAccessorIterator< const CMatrixColumnAccessorExtended< MAT >, const value_type > const_reverse_iterator
CMatrixColumnAccessor(MAT &mat, size_t colIdx)
AccessorIterator< A, T > & operator++()
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::AccessorIterator< const CConstMatrixColumnAccessorExtended< MAT >, const value_type > const_iterator
detail::AccessorIterator< const CConstMatrixRowAccessorExtended< MAT >, const value_type > const_iterator
const_reverse_iterator rbegin() const
detail::ReverseAccessorIterator< const CConstMatrixColumnAccessorExtended< MAT >, const value_type > const_reverse_iterator
const_reverse_iterator rbegin() const
ReverseAccessorIterator(A &obj, size_t N)
value_type operator[](const size_t i) const
reverse_iterator rbegin()
int operator-(const AccessorIterator< A, T > &it) const
const_reverse_iterator rbegin() const
CConstMatrixColumnAccessor< MAT > mrpt_autotype
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...
A vector-like wrapper for a Matrix for accessing the elements of a given column with a [] operator...
AccessorIterator< A, T > operator-(int off) const
const_iterator end() const
const_iterator begin() const
This class models a binary relation through the elements of any given set.
AccessorIterator< A, T > operator--(int)
detail::AccessorIterator< const CMatrixColumnAccessorExtended< MAT >, const value_type > const_iterator
CMatrixTemplate< U > MatrixType
const_iterator begin() const
const_iterator begin() const
GLsizei GLsizei GLuint * obj
detail::AccessorIterator< CMatrixColumnAccessor< MAT >, value_type > iterator
value_type operator[](size_t i) const
const_reverse_iterator rbegin() const
const_iterator end() const
ReverseAccessorIterator< A, T > operator--(int)
AccessorIterator< A, T > & operator+=(int off)
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...
const_reverse_iterator rend() const
detail::AccessorIterator< CMatrixRowAccessorExtended< MAT >, value_type > iterator
detail::ReverseAccessorIterator< const CMatrixRowAccessorExtended< MAT >, const value_type > const_reverse_iterator
ReverseAccessorIterator< A, T > & operator++()
const_reverse_iterator rbegin() const
ReverseAccessorIterator< A, T > & operator--()
CMatrixRowAccessor< MAT > getRowAccessor(MAT &m, size_t rowIdx)
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
value_type operator[](size_t i) const
detail::ReverseAccessorIterator< CMatrixRowAccessor< MAT >, value_type > reverse_iterator
CConstMatrixRowAccessor< MAT > mrpt_autotype
bool operator!=(const AccessorIterator< A, T > &it) const
const_iterator begin() const
CMatrixRowAccessorExtended< MAT > mrpt_autotype
bool operator!=(const ReverseAccessorIterator< A, T > &it) const
value_type operator[](size_t i) const
detail::ReverseAccessorIterator< const CConstMatrixRowAccessor< 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()
std::random_access_iterator_tag iterator_category
reverse_iterator rbegin()
AccessorIterator< A, T > operator++(int)
const_iterator begin() const
detail::AccessorIterator< const CMatrixColumnAccessor< MAT >, const value_type > const_iterator
value_type operator[](size_t i) const
CConstMatrixRowAccessor(const MAT &mat, size_t row)
const_iterator begin() const
CConstMatrixColumnAccessor(const MAT &mat, size_t colIdx)
CConstMatrixColumnAccessor()
detail::AccessorIterator< CMatrixColumnAccessorExtended< MAT >, value_type > iterator
This template class provides the basic functionality for a general 2D any-size, resizable container o...
const_iterator end() const
AccessorIterator< A, T > & operator--()
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
const_reverse_iterator rend() const
CMatrixTemplateObjects< U > MatrixType
CConstMatrixRowAccessorExtended< MAT > mrpt_autotype
AccessorIterator< A, T > & operator-=(int off)
Template class for matrix accessor's iterators.
T & operator[](int off) const
detail::AccessorIterator< const CMatrixRowAccessorExtended< MAT >, const value_type > const_iterator
detail::ReverseAccessorIterator< CMatrixColumnAccessor< MAT >, value_type > reverse_iterator
CMatrixColumnAccessorExtended< MAT > mrpt_autotype
const_reverse_iterator rend() const
GLenum GLenum GLvoid * row
CMatrixColumnAccessor< MAT > getColumnAccessor(MAT &m, size_t colIdx)
const_iterator end() const
detail::ReverseAccessorIterator< CMatrixColumnAccessorExtended< MAT >, value_type > reverse_iterator
value_type operator[](size_t i) const
const_reverse_iterator rbegin() const
AccessorIterator< A, T > & operator-=(int off)
AccessorIterator< A, T > operator-(int off) const
detail::ReverseAccessorIterator< const CConstMatrixRowAccessorExtended< MAT >, const value_type > const_reverse_iterator
value_type & operator[](const size_t i)
AccessorIterator(A &obj, size_t N)
CMatrixColumnAccessorExtended(MAT &mat, size_t col, size_t offset, size_t space)
CConstMatrixRowAccessorExtended()
const_iterator end() const
CConstMatrixColumnAccessorExtended()
const_reverse_iterator rend() const
detail::AccessorIterator< const CConstMatrixColumnAccessor< MAT >, const value_type > const_iterator
Template class for matrix accessor's iterators.
ReverseAccessorIterator< A, T > & operator+=(int off)
value_type operator[](size_t i) const
detail::ReverseAccessorIterator< const CMatrixRowAccessor< MAT >, const value_type > const_reverse_iterator
CMatrixColumnAccessorExtended()
ReverseAccessorIterator< A, T > operator+(int off) const
const_reverse_iterator rend() const
const_iterator end() const
A vector-like wrapper for a Matrix for accessing the elements of a given column with a [] operator...
detail::AccessorIterator< const CConstMatrixRowAccessor< MAT >, const value_type > const_iterator
detail::ReverseAccessorIterator< CMatrixRowAccessorExtended< MAT >, value_type > reverse_iterator
reverse_iterator rbegin()
ReverseAccessorIterator< A, T > operator++(int)
std::random_access_iterator_tag iterator_category
detail::AccessorIterator< const CMatrixRowAccessor< MAT >, const value_type > const_iterator
This template class extends the class "CMatrixTemplate" for storing "objects" at each matrix entry...
const_iterator end() const
const_iterator end() const
detail::ReverseAccessorIterator< const CMatrixColumnAccessor< MAT >, const value_type > const_reverse_iterator
detail::AccessorIterator< CMatrixRowAccessor< MAT >, value_type > 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)
AccessorIterator< A, T > operator+(int off) const
A vector-like wrapper for a const Matrix for accessing the elements of a given column with a [] opera...
detail::ReverseAccessorIterator< const CConstMatrixColumnAccessor< MAT >, const value_type > const_reverse_iterator