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)
This class models a binary relation through the elements of any given set.
A vector-like wrapper for a const Matrix for accessing the elements of a given column with a [] opera...
const_iterator begin() const
const_iterator end() const
const_reverse_iterator rend() const
typename MAT::Scalar value_type
detail::AccessorIterator< const CConstMatrixColumnAccessorExtended< MAT >, const value_type > const_iterator
value_type operator[](size_t i) const
CConstMatrixColumnAccessorExtended()
const_reverse_iterator rbegin() const
CConstMatrixColumnAccessorExtended(const MAT &mat, size_t col, size_t offset, size_t space)
detail::ReverseAccessorIterator< const CConstMatrixColumnAccessorExtended< MAT >, const value_type > const_reverse_iterator
A vector-like wrapper for a const Matrix for accessing the elements of a given column with a [] opera...
value_type operator[](size_t i) const
const_iterator end() const
detail::ReverseAccessorIterator< const CConstMatrixColumnAccessor< MAT >, const value_type > const_reverse_iterator
CConstMatrixColumnAccessor()
const_reverse_iterator rend() const
const_iterator begin() const
const_reverse_iterator rbegin() const
CConstMatrixColumnAccessor(const MAT &mat, size_t colIdx)
detail::AccessorIterator< const CConstMatrixColumnAccessor< MAT >, const value_type > const_iterator
typename MAT::Scalar value_type
A vector-like wrapper for a const Matrix for accessing the elements of a given row with a [] operator...
detail::ReverseAccessorIterator< const CConstMatrixRowAccessorExtended< MAT >, const value_type > const_reverse_iterator
CConstMatrixRowAccessorExtended()
const_reverse_iterator rbegin() const
detail::AccessorIterator< const CConstMatrixRowAccessorExtended< MAT >, const value_type > const_iterator
const_reverse_iterator rend() const
const_iterator begin() const
CConstMatrixRowAccessorExtended(const MAT &mat, size_t row, size_t offset, size_t space)
value_type operator[](size_t i) const
typename MAT::Scalar value_type
const_iterator end() const
A vector-like wrapper for a const Matrix for accessing the elements of a given row with a [] operator...
detail::ReverseAccessorIterator< const CConstMatrixRowAccessor< MAT >, const value_type > const_reverse_iterator
typename MAT::Scalar value_type
CConstMatrixRowAccessor()
const_reverse_iterator rbegin() const
detail::AccessorIterator< const CConstMatrixRowAccessor< MAT >, const value_type > const_iterator
value_type operator[](size_t i) const
const_iterator end() const
const_iterator begin() const
CConstMatrixRowAccessor(const MAT &mat, size_t row)
const_reverse_iterator rend() const
A vector-like wrapper for a Matrix for accessing the elements of a given column with a [] operator,...
value_type & operator[](size_t i)
typename MAT::Scalar value_type
const_reverse_iterator rend() const
const_iterator end() const
CMatrixColumnAccessorExtended()
const_iterator begin() const
detail::AccessorIterator< const CMatrixColumnAccessorExtended< MAT >, const value_type > const_iterator
detail::AccessorIterator< CMatrixColumnAccessorExtended< MAT >, value_type > iterator
reverse_iterator rbegin()
value_type operator[](size_t i) const
detail::ReverseAccessorIterator< CMatrixColumnAccessorExtended< MAT >, value_type > reverse_iterator
CMatrixColumnAccessorExtended(MAT &mat, size_t col, size_t offset, size_t space)
detail::ReverseAccessorIterator< const CMatrixColumnAccessorExtended< MAT >, const value_type > const_reverse_iterator
const_reverse_iterator rbegin() const
A vector-like wrapper for a Matrix for accessing the elements of a given column with a [] operator.
const_iterator end() const
detail::AccessorIterator< CMatrixColumnAccessor< MAT >, value_type > iterator
value_type operator[](const size_t i) const
detail::ReverseAccessorIterator< const CMatrixColumnAccessor< MAT >, const value_type > const_reverse_iterator
value_type & operator[](const size_t i)
typename MAT::Scalar value_type
const_reverse_iterator rend() const
const_iterator begin() const
const_reverse_iterator rbegin() const
detail::AccessorIterator< const CMatrixColumnAccessor< MAT >, const value_type > const_iterator
detail::ReverseAccessorIterator< CMatrixColumnAccessor< MAT >, value_type > reverse_iterator
reverse_iterator rbegin()
CMatrixColumnAccessor(MAT &mat, size_t colIdx)
A vector-like wrapper for a Matrix for accessing the elements of a given row with a [] operator,...
const_iterator begin() const
value_type operator[](size_t i) const
value_type & operator[](size_t i)
const_iterator end() const
detail::AccessorIterator< CMatrixRowAccessorExtended< MAT >, value_type > iterator
detail::ReverseAccessorIterator< const CMatrixRowAccessorExtended< MAT >, const value_type > const_reverse_iterator
const_reverse_iterator rend() const
CMatrixRowAccessorExtended(MAT &mat, size_t row, size_t offset, size_t space)
reverse_iterator rbegin()
typename MAT::Scalar value_type
detail::ReverseAccessorIterator< CMatrixRowAccessorExtended< MAT >, value_type > reverse_iterator
const_reverse_iterator rbegin() const
CMatrixRowAccessorExtended()
detail::AccessorIterator< const CMatrixRowAccessorExtended< MAT >, const value_type > const_iterator
A vector-like wrapper for a Matrix for accessing the elements of a given row with a [] operator.
const_reverse_iterator rend() const
detail::ReverseAccessorIterator< CMatrixRowAccessor< MAT >, value_type > reverse_iterator
const_reverse_iterator rbegin() const
reverse_iterator rbegin()
detail::ReverseAccessorIterator< const CMatrixRowAccessor< MAT >, const value_type > const_reverse_iterator
typename MAT::Scalar value_type
CMatrixRowAccessor(MAT &mat, size_t rowIdx)
detail::AccessorIterator< CMatrixRowAccessor< MAT >, value_type > iterator
detail::AccessorIterator< const CMatrixRowAccessor< MAT >, const value_type > const_iterator
value_type operator[](const size_t i) const
const_iterator begin() const
const_iterator end() const
value_type & operator[](const size_t i)
This template class provides the basic functionality for a general 2D any-size, resizable container o...
This template class extends the class "CMatrixTemplate" for storing "objects" at each matrix entry.
Template class for matrix accessor's iterators.
AccessorIterator(A &obj, size_t N)
bool operator==(const AccessorIterator< A, T > &it) const
std::random_access_iterator_tag iterator_category
T & operator[](int off) const
AccessorIterator< A, T > operator++(int)
AccessorIterator< A, T > & operator--()
AccessorIterator< A, T > operator+(int off) const
AccessorIterator< A, T > operator--(int)
AccessorIterator< A, T > & operator++()
AccessorIterator< A, T > operator-(int off) const
bool operator!=(const AccessorIterator< A, T > &it) const
AccessorIterator< A, T > & operator+=(int off)
AccessorIterator< A, T > & operator-=(int off)
int operator-(const AccessorIterator< A, T > &it) const
This template is a trick to switch the type of a variable using a boolean variable in the template.
Template class for matrix accessor's iterators.
ReverseAccessorIterator< A, T > & operator+=(int off)
ReverseAccessorIterator< A, T > operator+(int off) const
ReverseAccessorIterator< A, T > & operator--()
AccessorIterator< A, T > & operator-=(int off)
bool operator==(const ReverseAccessorIterator< A, T > &it) const
ReverseAccessorIterator(A &obj, size_t N)
T & operator[](int off) const
ReverseAccessorIterator< A, T > & operator++()
ReverseAccessorIterator< A, T > operator--(int)
int operator-(const ReverseAccessorIterator< A, T > &it) const
bool operator!=(const ReverseAccessorIterator< A, T > &it) const
AccessorIterator< A, T > operator-(int off) const
ReverseAccessorIterator< A, T > operator++(int)
std::random_access_iterator_tag iterator_category
#define ASSERT_(f)
Defines an assertion mechanism.
GLsizei GLsizei GLuint * obj
GLenum GLenum GLvoid * row
void applyFunction(CBinaryRelation< T, U, UIsObject > &o, FunctionType fun, size_t e1, size_t e2, const T &T1, const T &T2)
CMatrixRowAccessor< MAT > getRowAccessor(MAT &m, size_t rowIdx)
CMatrixColumnAccessor< MAT > getColumnAccessor(MAT &m, size_t colIdx)
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.