MRPT  1.9.9
matrix_adaptors.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | http://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2018, Individual contributors, see AUTHORS file |
6  | See: http://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See details in http://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 #ifndef mrpt_matrix_adaptors_H
10 #define mrpt_matrix_adaptors_H
11 
12 #include <mrpt/math/math_frwds.h> // forward declarations
13 
14 namespace mrpt
15 {
16 namespace math
17 {
18 /** Internal classes not to be directly used by the user. */
19 // Forward declarations:
20 template <typename T, typename U, bool UIsObject>
21 class CBinaryRelation;
22 namespace detail
23 {
24 /**
25  * This template is a trick to switch the type of a variable using a boolean
26  * variable in the template. It's easy to extend its functionality to several
27  * types, using a unsigned char instead of a bool.
28  */
29 template <typename U, bool B>
31 
32 // partial specializations:
33 template <typename U>
34 class MatrixWrapper<U, true>
35 {
36  public:
38 };
39 template <typename U>
40 class MatrixWrapper<U, false>
41 {
42  public:
44 };
45 
46 template <typename T, typename U, bool UIsObject, typename FunctionType>
47 inline void applyFunction(
48  CBinaryRelation<T, U, UIsObject>& o, FunctionType fun, size_t e1, size_t e2,
49  const T& T1, const T& T2);
50 } // namespace detail
51 
52 namespace detail
53 {
54 /** Template class for matrix accessor's iterators.
55  * \sa CMatrixRowAccessor,CMatrixColumnAccessor
56  */
57 template <typename A, typename T>
59 {
60  protected:
61  A* base;
62  int pos;
63 
64  public:
65  // typedefs for iterator_traits:
66  using iterator_category = std::random_access_iterator_tag;
67  using value_type = T;
68  using difference_type = int;
69  using pointer = T*;
70  using reference = T&;
71 
72  inline AccessorIterator(A& obj, size_t N) : base(&obj), pos(N) {}
73  inline T& operator*() const { return (*base)[pos]; }
75  {
76  ++pos;
77  return *this;
78  }
80  {
81  AccessorIterator<A, T> it = *this;
82  ++*this;
83  return it;
84  }
86  {
87  --pos;
88  return *this;
89  }
91  {
92  AccessorIterator<A, T> it = *this;
93  --*this;
94  return it;
95  }
97  {
98  pos += off;
99  return *this;
100  }
101  inline AccessorIterator<A, T> operator+(int off) const
102  {
103  AccessorIterator<A, T> it = *this;
104  it += off;
105  return it;
106  }
108  {
109  pos -= off;
110  return *this;
111  }
112  inline AccessorIterator<A, T> operator-(int off) const
113  {
114  AccessorIterator<A, T> it = *this;
115  it -= off;
116  return it;
117  }
118  inline int operator-(const AccessorIterator<A, T>& it) const
119  {
120  return pos - it.pos;
121  }
122  inline T& operator[](int off) const { return (*base)[pos + off]; }
123  inline bool operator==(const AccessorIterator<A, T>& it) const
124  {
125  return (pos == it.pos) && (base == it.base);
126  }
127  inline bool operator!=(const AccessorIterator<A, T>& it) const
128  {
129  return !(operator==(it));
130  }
131 };
132 
133 /** Template class for matrix accessor's iterators.
134  * \sa CMatrixRowAccessor,CMatrixColumnAccessor
135  */
136 template <typename A, typename T>
138 {
139  protected:
140  A* base;
141  int pos;
142 
143  public:
144  // typedefs for iterator_traits:
145  using iterator_category = std::random_access_iterator_tag;
146  using value_type = T;
147  using difference_type = int;
148  using pointer = T*;
149  using reference = T&;
150 
151  inline ReverseAccessorIterator(A& obj, size_t N) : base(&obj), pos(N) {}
152  inline T& operator*() const { return (*base)[pos]; }
154  {
155  --pos;
156  return *this;
157  }
159  {
161  ++*this; // Yes, that's right.
162  return it;
163  }
165  {
166  ++pos;
167  return *this;
168  }
170  {
172  --*this; // Yes, that's right.
173  return it;
174  }
176  {
177  pos -= off;
178  return *this;
179  }
181  {
183  it += off; // Yes, that's right.
184  return it;
185  }
187  {
188  pos += off;
189  return *this;
190  }
191  inline AccessorIterator<A, T> operator-(int off) const
192  {
194  it -= off; // Yes, that's right
195  return it;
196  }
197  inline int operator-(const ReverseAccessorIterator<A, T>& it) const
198  {
199  return it.pos - pos;
200  }
201  inline T& operator[](int off) const { return (*base)[pos - off]; }
202  inline bool operator==(const ReverseAccessorIterator<A, T>& it) const
203  {
204  return (pos == it.pos) && (&base == &it.base);
205  }
206  inline bool operator!=(const ReverseAccessorIterator<A, T>& it) const
207  {
208  return !(operator==(it));
209  }
210 };
211 } // namespace detail
212 
213 /** A vector-like wrapper for a Matrix for accessing the elements of a given row
214  * with a [] operator.
215  * For usage with MRPT's CMatrixTemplate only (for MRPT numeric matrices, use
216  * Eigen methods)
217  * \sa
218  * CMatrixColumnAccessor,CMatrixRowAccessorExtended,CConstMatrixRowAccessor,CConstMatrixRowAccessorExtended
219  */
220 template <typename MAT>
222 {
223  protected:
224  MAT* m_mat;
225  size_t m_rowInd;
226 
227  public:
228  using value_type = typename MAT::Scalar;
230  inline CMatrixRowAccessor(MAT& mat, size_t rowIdx)
231  : m_mat(&mat), m_rowInd(rowIdx)
232  {
233  ASSERT_(rowIdx < mat.rows();
234  }
235  inline CMatrixRowAccessor() {}
236  inline value_type& operator[](const size_t i)
237  {
238  return (*m_mat)(m_rowInd, i);
239  }
240  inline value_type operator[](const size_t i) const
241  {
242  return (*m_mat)(m_rowInd, i);
243  }
244  using iterator =
248  using reverse_iterator =
252  inline iterator begin() { return iterator(*this, 0); }
253  inline const_iterator begin() const { return const_iterator(*this, 0); }
254  inline iterator end() { return iterator(*this, m_mat->cols()); }
255  inline const_iterator end() const
256  {
257  return const_iterator(*this, m_mat->cols());
258  }
260  {
261  return reverse_iterator(*this, m_mat->cols() - 1);
262  }
264  {
265  return const_reverse_iterator(*this, m_mat->cols() - 1);
266  }
267  inline reverse_iterator rend() { return reverse_iterator(*this, -1); }
269  {
270  return const_reverse_iterator(*this, -1);
271  }
272  inline size_t size() const { return m_mat->cols(); }
273  inline void resize(size_t N)
274  {
275  if (N != size())
276  throw std::logic_error("Tried to resize a fixed-size vector");
277  }
278 };
279 template <typename MAT>
280 inline CMatrixRowAccessor<MAT> getRowAccessor(MAT& m, size_t rowIdx)
281 {
282  return CMatrixRowAccessor<MAT>(m, rowIdx);
283 }
284 
285 /** A vector-like wrapper for a Matrix for accessing the elements of a given row
286  * with a [] operator, with offset and custom spacing.
287  * For usage with MRPT's CMatrixTemplate only (for MRPT numeric matrices, use
288  * Eigen methods)
289  * \sa
290  * CMatrixColumnAccessorExtended,CMatrixRowAccessor,CConstMatrixRowAccessor,CConstMatrixRowAccessorExtended
291  */
292 template <class MAT>
294 {
295  protected:
296  MAT* m_mat;
297  size_t m_rowInd;
298  size_t m_colOffset;
300  size_t howMany;
301 
302  public:
303  using value_type = typename MAT::Scalar;
306  MAT& mat, size_t row, size_t offset, size_t space)
307  : m_mat(&mat),
308  m_rowInd(row),
310  m_elementsSpace(space)
311  {
312  ASSERT_(row < mat.rows());
313  howMany = (mat.cols() - m_colOffset) / m_elementsSpace;
314  }
316  inline value_type& operator[](size_t i)
317  {
318  return (*m_mat)(m_rowInd, m_colOffset + (i * m_elementsSpace));
319  }
320  inline value_type operator[](size_t i) const
321  {
322  return (*m_mat)(m_rowInd, m_colOffset + (i * m_elementsSpace));
323  }
324  using iterator =
332  inline iterator begin() { return iterator(*this, 0); }
333  inline const_iterator begin() const { return const_iterator(*this, 0); }
334  inline iterator end() { return iterator(*this, howMany); }
335  inline const_iterator end() const { return const_iterator(*this, howMany); }
337  {
338  return reverse_iterator(*this, howMany - 1);
339  }
341  {
342  return const_reverse_iterator(*this, howMany - 1);
343  }
344  inline reverse_iterator rend() { return reverse_iterator(*this, -1); }
346  {
347  return const_reverse_iterator(*this, -1);
348  }
349  inline size_t size() const { return howMany; }
350  inline void resize(size_t N)
351  {
352  if (N != size())
353  throw std::logic_error("Tried to resize a fixed-size vector");
354  }
355 };
356 template <typename MAT>
358  MAT& m, size_t rowIdx, size_t offset, size_t space = 1)
359 {
360  return CMatrixRowAccessor<MAT>(m, rowIdx, offset, space);
361 }
362 
363 /** A vector-like wrapper for a const Matrix for accessing the elements of a
364  * given row with a [] operator.
365  * For usage with MRPT's CMatrixTemplate only (for MRPT numeric matrices, use
366  * Eigen methods)
367  * \sa
368  * CConstMatrixColumnAccessor,CMatrixRowAccessorExtended,CMatrixRowAccessor,CConstMatrixRowAccessorExtended
369  */
370 template <class MAT>
372 {
373  protected:
374  const MAT* m_mat;
375  size_t m_rowInd;
376 
377  public:
378  using value_type = typename MAT::Scalar;
380  inline CConstMatrixRowAccessor(const MAT& mat, size_t row)
381  : m_mat(&mat), m_rowInd(row)
382  {
383  ASSERT_(row < mat.rows());
384  }
386  inline value_type operator[](size_t i) const
387  {
388  return (*m_mat)(m_rowInd, i);
389  }
394  inline const_iterator begin() const { return const_iterator(*this, 0); }
395  inline const_iterator end() const
396  {
397  return const_iterator(*this, m_mat->cols());
398  }
400  {
401  return const_reverse_iterator(*this, m_mat->cols() - 1);
402  }
404  {
405  return const_reverse_iterator(*this, -1);
406  }
407  inline size_t size() const { return m_mat->cols(); }
408  inline void resize(size_t N)
409  {
410  if (N != size())
411  throw std::logic_error("Tried to resize a fixed-size vector");
412  }
413 };
414 template <typename MAT>
415 inline CConstMatrixRowAccessor<MAT> getRowAccessor(const MAT& m, size_t rowIdx)
416 {
417  return CMatrixRowAccessor<MAT>(m, rowIdx);
418 }
419 
420 /** A vector-like wrapper for a const Matrix for accessing the elements of a
421  * given row with a [] operator, with offset and custom spacing.
422  * For usage with MRPT's CMatrixTemplate only (for MRPT numeric matrices, use
423  * Eigen methods)
424  * \sa
425  * CConstMatrixColumnAccessorExtended,CMatrixRowAccessor,CConstMatrixRowAccessor,CMatrixRowAccessorExtended
426  */
427 template <class MAT>
429 {
430  protected:
431  const MAT* m_mat;
432  size_t m_rowInd;
433  size_t m_colOffset;
435  size_t howMany;
436 
437  public:
438  using value_type = typename MAT::Scalar;
441  const MAT& mat, size_t row, size_t offset, size_t space)
442  : m_mat(&mat),
443  m_rowInd(row),
445  m_elementsSpace(space)
446  {
447  ASSERT_(row < mat.rows());
448  howMany = (mat.cols() - m_colOffset) / m_elementsSpace;
449  }
451  inline value_type operator[](size_t i) const
452  {
453  return (*m_mat)(m_rowInd, m_colOffset + (i * m_elementsSpace));
454  }
459  inline const_iterator begin() const { return const_iterator(*this, 0); }
460  inline const_iterator end() const { return const_iterator(*this, howMany); }
462  {
463  return const_reverse_iterator(*this, howMany - 1);
464  }
466  {
467  return const_reverse_iterator(*this, -1);
468  }
469  inline size_t size() const { return howMany; }
470  inline void resize(size_t N)
471  {
472  if (N != size())
473  throw std::logic_error("Tried to resize a fixed-size vector");
474  }
475 };
476 template <typename MAT>
478  const MAT& m, size_t rowIdx, size_t offset, size_t space = 1)
479 {
480  return CConstMatrixRowAccessorExtended<MAT>(m, rowIdx, offset, space);
481 }
482 
483 /** A vector-like wrapper for a Matrix for accessing the elements of a given
484  * column with a [] operator.
485  * \sa
486  * CMatrixRowAccessor,CMatrixColumnAccessorExtended,CConstMatrixColumnAccessor,CConstMatrixColumnAccessorExtended
487  */
488 template <typename MAT>
490 {
491  protected:
492  MAT* m_mat;
493  size_t m_colInd;
494 
495  public:
496  using value_type = typename MAT::Scalar;
498  inline CMatrixColumnAccessor(MAT& mat, size_t colIdx)
499  : m_mat(&mat), m_colInd(colIdx)
500  {
501  ASSERT_(colIdx < mat.cols();
502  }
504  inline value_type& operator[](const size_t i)
505  {
506  return (*m_mat)(i, m_colInd);
507  }
508  inline value_type operator[](const size_t i) const
509  {
510  return (*m_mat)(i, m_colInd);
511  }
512  using iterator =
516  using reverse_iterator =
520  inline iterator begin() { return iterator(*this, 0); }
521  inline const_iterator begin() const { return const_iterator(*this, 0); }
522  inline iterator end() { return iterator(*this, m_mat->rows()); }
523  inline const_iterator end() const
524  {
525  return const_iterator(*this, m_mat->rows());
526  }
528  {
529  return reverse_iterator(*this, m_mat->rows() - 1);
530  }
532  {
533  return const_reverse_iterator(*this, m_mat->rows() - 1);
534  }
535  inline reverse_iterator rend() { return reverse_iterator(*this, -1); }
537  {
538  return const_reverse_iterator(*this, -1);
539  }
540  inline size_t size() const { return m_mat->rows(); }
541  inline void resize(size_t N)
542  {
543  if (N != size())
544  throw std::logic_error("Tried to resize a fixed-size vector");
545  }
546 };
547 template <typename MAT>
548 inline CMatrixColumnAccessor<MAT> getColumnAccessor(MAT& m, size_t colIdx)
549 {
550  return CMatrixColumnAccessor<MAT>(m, colIdx);
551 }
552 
553 /** A vector-like wrapper for a Matrix for accessing the elements of a given
554  * column with a [] operator, with offset and custom spacing.
555  * \sa
556  * CMatrixRowAccessorExtended,CMatrixColumnAccessor,CConstMatrixColumnAccessor,CConstMatrixColumnAccessorExtended
557  */
558 template <typename MAT>
560 {
561  protected:
562  MAT* m_mat;
563  size_t m_colInd;
564  size_t m_rowOffset;
566  size_t howMany;
567 
568  public:
569  using value_type = typename MAT::Scalar;
572  MAT& mat, size_t col, size_t offset, size_t space)
573  : m_mat(&mat),
574  m_colInd(col),
576  m_elementsSpace(space)
577  {
578  ASSERT_(col < mat.cols());
579  howMany = (mat.rows() - m_rowOffset) / m_elementsSpace;
580  }
582  inline value_type& operator[](size_t i)
583  {
584  return (*m_mat)(m_rowOffset + (i * m_elementsSpace), m_colInd);
585  }
586  inline value_type operator[](size_t i) const
587  {
588  return (*m_mat)(m_rowOffset + (i * m_elementsSpace), m_colInd);
589  }
598  inline iterator begin() { return iterator(*this, 0); }
599  inline const_iterator begin() const { return const_iterator(*this, 0); }
600  inline iterator end() { return iterator(*this, howMany); }
601  inline const_iterator end() const { return const_iterator(*this, howMany); }
603  {
604  return reverse_iterator(*this, howMany - 1);
605  }
607  {
608  return const_reverse_iterator(*this, howMany - 1);
609  }
610  inline reverse_iterator rend() { return reverse_iterator(*this, -1); }
612  {
613  return const_reverse_iterator(*this, -1);
614  }
615  inline size_t size() const { return howMany; }
616  inline void resize(size_t N)
617  {
618  if (N != size())
619  throw std::logic_error("Tried to resize a fixed-size vector");
620  }
621 };
622 template <typename MAT>
624  MAT& m, size_t colIdx, size_t offset, size_t space = 1)
625 {
626  return CMatrixColumnAccessorExtended<MAT>(m, colIdx, offset, space);
627 }
628 
629 /** A vector-like wrapper for a const Matrix for accessing the elements of a
630  * given column with a [] operator.
631  * \sa
632  * CConstMatrixRowAccessor,CMatrixColumnAccessorExtended,CMatrixColumnAccessor,CConstMatrixColumnAccessorExtended
633  */
634 template <class MAT>
636 {
637  protected:
638  const MAT* m_mat;
639  size_t m_colInd;
640 
641  public:
642  using value_type = typename MAT::Scalar;
644  inline CConstMatrixColumnAccessor(const MAT& mat, size_t colIdx)
645  : m_mat(&mat), m_colInd(colIdx)
646  {
647  ASSERT_(colIdx < mat.cols());
648  }
650  inline value_type operator[](size_t i) const
651  {
652  return (*m_mat)(i, m_colInd);
653  }
658  inline const_iterator begin() const { return const_iterator(*this, 0); }
659  inline const_iterator end() const
660  {
661  return const_iterator(*this, m_mat->rows());
662  }
664  {
665  return const_reverse_iterator(*this, m_mat->rows() - 1);
666  }
668  {
669  return const_reverse_iterator(*this, -1);
670  }
671  inline size_t size() const { return m_mat->rows(); }
672  inline void resize(size_t N)
673  {
674  if (N != size())
675  throw std::logic_error("Tried to resize a fixed-size vector");
676  }
677 };
678 template <typename MAT>
680  const MAT& m, size_t colIdx)
681 {
682  return CConstMatrixColumnAccessor<MAT>(m, colIdx);
683 }
684 
685 /** A vector-like wrapper for a const Matrix for accessing the elements of a
686  * given column with a [] operator, with offset and custom spacing.
687  * \sa
688  * CConstMatrixRowAccessorExtended,CMatrixColumnAccessor,CConstMatrixColumnAccessor,CMatrixColumnAccessorExtended
689  */
690 template <typename MAT>
692 {
693  protected:
694  const MAT* m_mat;
695  size_t m_colInd;
696  size_t m_rowOffset;
698  size_t howMany;
699 
700  public:
701  using value_type = typename MAT::Scalar;
704  const MAT& mat, size_t col, size_t offset, size_t space)
705  : m_mat(&mat),
706  m_colInd(col),
708  m_elementsSpace(space)
709  {
710  ASSERT_(col < mat.cols());
711  howMany = (mat.rows() - m_rowOffset) / m_elementsSpace;
712  }
714  inline value_type operator[](size_t i) const
715  {
716  return (*m_mat)(m_rowOffset + (i * m_elementsSpace), m_colInd);
717  }
722  inline const_iterator begin() const { return const_iterator(*this, 0); }
723  inline const_iterator end() const { return const_iterator(*this, howMany); }
725  {
726  return const_reverse_iterator(*this, howMany - 1);
727  }
729  {
730  return const_reverse_iterator(*this, -1);
731  }
732  inline size_t size() const { return howMany; }
733  inline void resize(size_t N)
734  {
735  if (N != size())
736  throw std::logic_error("Tried to resize a fixed-size vector");
737  }
738 };
739 template <typename MAT>
741  const MAT& m, size_t colIdx, size_t offset, size_t space = 1)
742 {
743  return CConstMatrixColumnAccessorExtended<MAT>(m, colIdx, offset, space);
744 }
745 
746 } // namespace math
747 } // namespace mrpt
748 
749 #endif
detail::ReverseAccessorIterator< const CConstMatrixRowAccessor< MAT >, const value_type > const_reverse_iterator
bool operator==(const AccessorIterator< A, T > &it) const
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)
Scalar * iterator
Definition: eigen_plugins.h:26
detail::AccessorIterator< CMatrixRowAccessorExtended< MAT >, value_type > iterator
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...
double Scalar
Definition: KmUtils.h:44
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
value_type operator[](const size_t i) const
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)
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...
GLintptr offset
Definition: glext.h:3925
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
AccessorIterator< A, T > & operator+=(int off)
detail::AccessorIterator< const CConstMatrixColumnAccessorExtended< MAT >, const value_type > const_iterator
GLsizei GLsizei GLuint * obj
Definition: glext.h:4070
value_type operator[](size_t i) const
const_reverse_iterator rbegin() 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
#define ASSERT_(f)
Defines an assertion mechanism.
Definition: exceptions.h:113
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
int operator-(const ReverseAccessorIterator< A, T > &it) const
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)
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...
detail::AccessorIterator< CMatrixRowAccessor< MAT >, value_type > iterator
value_type operator[](size_t i) const
ReverseAccessorIterator< A, T > & operator++()
ReverseAccessorIterator< A, T > & operator--()
CConstMatrixRowAccessor(const MAT &mat, size_t row)
detail::ReverseAccessorIterator< CMatrixColumnAccessorExtended< MAT >, value_type > reverse_iterator
CConstMatrixColumnAccessor(const MAT &mat, size_t colIdx)
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
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
const_reverse_iterator rend() const
typename MAT::Scalar value_type
Template class for matrix accessor&#39;s iterators.
AccessorIterator< A, T > & operator++()
const_reverse_iterator rend() const
GLenum GLenum GLvoid * row
Definition: glext.h:3576
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
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
CMatrixColumnAccessorExtended(MAT &mat, size_t col, size_t offset, size_t space)
AccessorIterator< A, T > operator+(int off) const
detail::ReverseAccessorIterator< const CConstMatrixColumnAccessor< MAT >, const value_type > const_reverse_iterator
const_reverse_iterator rend() const
Template class for matrix accessor&#39;s iterators.
detail::AccessorIterator< const CConstMatrixRowAccessorExtended< MAT >, const value_type > const_iterator
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
AccessorIterator< A, T > & operator-=(int off)
A vector-like wrapper for a Matrix for accessing the elements of a given column with a [] operator...
const Scalar * const_iterator
Definition: eigen_plugins.h:27
This template class extends the class "CMatrixTemplate" for storing "objects" at each matrix entry...
AccessorIterator< A, T > & operator-=(int off)
detail::AccessorIterator< CMatrixColumnAccessorExtended< MAT >, value_type > iterator
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
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...



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 7d5e6d718 Fri Aug 24 01:51:28 2018 +0200 at lun nov 2 08:35:50 CET 2020