Main MRPT website > C++ reference for MRPT 1.5.6
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-2017, 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/utils/utils_defs.h>
13 #include <mrpt/math/math_frwds.h> // forward declarations
14 
15 namespace mrpt
16 {
17  namespace math
18  {
19 
20  /** Internal classes not to be directly used by the user. */
21  // Forward declarations:
22  template<typename T,typename U,bool UIsObject> class CBinaryRelation;
23  namespace detail
24  {
25  /**
26  * This template is a trick to switch the type of a variable using a boolean 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> class MatrixWrapper;
30 
31  // partial specializations:
32  template<typename U> class MatrixWrapper<U,true> {
33  public:
35  };
36  template<typename U> class MatrixWrapper<U,false> {
37  public:
39  };
40 
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);
42  }
43 
44 
45  namespace detail {
46  /** Template class for matrix accessor's iterators.
47  * \sa CMatrixRowAccessor,CMatrixColumnAccessor
48  */
49  template<typename A,typename T> class AccessorIterator {
50  protected:
51  A *base;
52  int pos;
53  public:
54  //typedefs for iterator_traits:
55  typedef std::random_access_iterator_tag iterator_category;
56  typedef T value_type;
57  typedef int difference_type;
58  typedef T *pointer;
59  typedef T &reference;
60 
61  inline AccessorIterator(A &obj,size_t N):base(&obj),pos(N) {}
62  inline T &operator*() const {
63  return (*base)[pos];
64  }
66  ++pos;
67  return *this;
68  }
70  AccessorIterator<A,T> it=*this;
71  ++*this;
72  return it;
73  }
75  --pos;
76  return *this;
77  }
79  AccessorIterator<A,T> it=*this;
80  --*this;
81  return it;
82  }
83  inline AccessorIterator<A,T> &operator+=(int off) {
84  pos+=off;
85  return *this;
86  }
87  inline AccessorIterator<A,T> operator+(int off) const {
88  AccessorIterator<A,T> it=*this;
89  it+=off;
90  return it;
91  }
92  inline AccessorIterator<A,T> &operator-=(int off) {
93  pos-=off;
94  return *this;
95  }
96  inline AccessorIterator<A,T> operator-(int off) const {
97  AccessorIterator<A,T> it=*this;
98  it-=off;
99  return it;
100  }
101  inline int operator-(const AccessorIterator<A,T> &it) const {
102  return pos-it.pos;
103  }
104  inline T &operator[](int off) const {
105  return (*base)[pos+off];
106  }
107  inline bool operator==(const AccessorIterator<A,T> &it) const {
108  return (pos==it.pos)&&(base==it.base);
109  }
110  inline bool operator!=(const AccessorIterator<A,T> &it) const {
111  return !(operator==(it));
112  }
113  };
114 
115  /** Template class for matrix accessor's iterators.
116  * \sa CMatrixRowAccessor,CMatrixColumnAccessor
117  */
118  template<typename A,typename T> class ReverseAccessorIterator {
119  protected:
120  A *base;
121  int pos;
122  public:
123  //typedefs for iterator_traits:
124  typedef std::random_access_iterator_tag iterator_category;
125  typedef T value_type;
126  typedef int difference_type;
127  typedef T *pointer;
128  typedef T &reference;
129 
130  inline ReverseAccessorIterator(A &obj,size_t N):base(&obj),pos(N) {}
131  inline T &operator*() const {
132  return (*base)[pos];
133  }
135  --pos;
136  return *this;
137  }
140  ++*this; //Yes, that's right.
141  return it;
142  }
144  ++pos;
145  return *this;
146  }
149  --*this; //Yes, that's right.
150  return it;
151  }
153  pos-=off;
154  return *this;
155  }
156  inline ReverseAccessorIterator<A,T> operator+(int off) const {
158  it+=off; //Yes, that's right.
159  return it;
160  }
162  pos+=off;
163  return *this;
164  }
165  inline AccessorIterator<A,T> operator-(int off) const {
167  it-=off; //Yes, that's right
168  return it;
169  }
170  inline int operator-(const ReverseAccessorIterator<A,T> &it) const {
171  return it.pos-pos;
172  }
173  inline T &operator[](int off) const {
174  return (*base)[pos-off];
175  }
176  inline bool operator==(const ReverseAccessorIterator<A,T> &it) const {
177  return (pos==it.pos)&&(&base==&it.base);
178  }
179  inline bool operator!=(const ReverseAccessorIterator<A,T> &it) const {
180  return !(operator==(it));
181  }
182  };
183  } //End of detail namespace
184 
185 
186  /** A vector-like wrapper for a Matrix for accessing the elements of a given row with a [] operator.
187  * For usage with MRPT's CMatrixTemplate only (for MRPT numeric matrices, use Eigen methods)
188  * \sa CMatrixColumnAccessor,CMatrixRowAccessorExtended,CConstMatrixRowAccessor,CConstMatrixRowAccessorExtended
189  */
190  template <typename MAT>
192  {
193  protected:
194  MAT *m_mat;
195  size_t m_rowInd;
196  public:
197  typedef typename MAT::Scalar value_type;
199  inline CMatrixRowAccessor(MAT &mat, size_t rowIdx) : m_mat(&mat), m_rowInd(rowIdx) { ASSERT_(rowIdx<mat.getRowCount()) }
200  inline CMatrixRowAccessor() {}
201  inline value_type &operator[](const size_t i) { return (*m_mat)(m_rowInd,i); }
202  inline value_type operator[](const size_t i) const { return (*m_mat)(m_rowInd,i); }
207  inline iterator begin() {
208  return iterator(*this,0);
209  }
210  inline const_iterator begin() const {
211  return const_iterator(*this,0);
212  }
213  inline iterator end() {
214  return iterator(*this,m_mat->getColCount());
215  }
216  inline const_iterator end() const {
217  return const_iterator(*this,m_mat->getColCount());
218  }
219  inline reverse_iterator rbegin() {
220  return reverse_iterator(*this,m_mat->getColCount()-1);
221  }
222  inline const_reverse_iterator rbegin() const {
223  return const_reverse_iterator(*this,m_mat->getColCount()-1);
224  }
225  inline reverse_iterator rend() {
226  return reverse_iterator(*this,-1);
227  }
228  inline const_reverse_iterator rend() const {
229  return const_reverse_iterator(*this,-1);
230  }
231  inline size_t size() const {
232  return m_mat->getColCount();
233  }
234  inline void resize(size_t N) {
235  if (N!=size()) throw std::logic_error("Tried to resize a fixed-size vector");
236  }
237  };
238  template<typename MAT> inline CMatrixRowAccessor<MAT> getRowAccessor(MAT &m,size_t rowIdx) {
239  return CMatrixRowAccessor<MAT>(m,rowIdx);
240  }
241 
242  /** A vector-like wrapper for a Matrix for accessing the elements of a given row with a [] operator, with offset and custom spacing.
243  * For usage with MRPT's CMatrixTemplate only (for MRPT numeric matrices, use Eigen methods)
244  * \sa CMatrixColumnAccessorExtended,CMatrixRowAccessor,CConstMatrixRowAccessor,CConstMatrixRowAccessorExtended
245  */
246  template<class MAT>
248  protected:
249  MAT *m_mat;
250  size_t m_rowInd;
251  size_t m_colOffset;
253  size_t howMany;
254  public:
255  typedef typename MAT::Scalar value_type;
257  inline CMatrixRowAccessorExtended(MAT &mat,size_t row,size_t offset,size_t space):m_mat(&mat),m_rowInd(row),m_colOffset(offset),m_elementsSpace(space) {
258  ASSERT_(row<mat.getRowCount());
259  howMany=(mat.getColCount()-m_colOffset)/m_elementsSpace;
260  }
262  inline value_type &operator[](size_t i) {
263  return (*m_mat)(m_rowInd,m_colOffset+(i*m_elementsSpace));
264  }
265  inline value_type operator[](size_t i) const {
266  return (*m_mat)(m_rowInd,m_colOffset+(i*m_elementsSpace));
267  }
272  inline iterator begin() {
273  return iterator(*this,0);
274  }
275  inline const_iterator begin() const {
276  return const_iterator(*this,0);
277  }
278  inline iterator end() {
279  return iterator(*this,howMany);
280  }
281  inline const_iterator end() const {
282  return const_iterator(*this,howMany);
283  }
285  return reverse_iterator(*this,howMany-1);
286  }
288  return const_reverse_iterator(*this,howMany-1);
289  }
291  return reverse_iterator(*this,-1);
292  }
293  inline const_reverse_iterator rend() const {
294  return const_reverse_iterator(*this,-1);
295  }
296  inline size_t size() const {
297  return howMany;
298  }
299  inline void resize(size_t N) {
300  if (N!=size()) throw std::logic_error("Tried to resize a fixed-size vector");
301  }
302  };
303  template<typename MAT> inline CMatrixRowAccessorExtended<MAT> getRowAccessor(MAT &m,size_t rowIdx,size_t offset,size_t space=1) {
304  return CMatrixRowAccessor<MAT>(m,rowIdx,offset,space);
305  }
306 
307  /** A vector-like wrapper for a const Matrix for accessing the elements of a given row with a [] operator.
308  * For usage with MRPT's CMatrixTemplate only (for MRPT numeric matrices, use Eigen methods)
309  * \sa CConstMatrixColumnAccessor,CMatrixRowAccessorExtended,CMatrixRowAccessor,CConstMatrixRowAccessorExtended
310  */
311  template<class MAT>
313  protected:
314  const MAT *m_mat;
315  size_t m_rowInd;
316  public:
317  typedef typename MAT::Scalar value_type;
319  inline CConstMatrixRowAccessor(const MAT &mat,size_t row):m_mat(&mat),m_rowInd(row) {
320  ASSERT_(row<mat.getRowCount());
321  }
323  inline value_type operator[](size_t i) const {
324  return (*m_mat)(m_rowInd,i);
325  }
328  inline const_iterator begin() const {
329  return const_iterator(*this,0);
330  }
331  inline const_iterator end() const {
332  return const_iterator(*this,m_mat->getColCount());
333  }
335  return const_reverse_iterator(*this,m_mat->getColCount()-1);
336  }
337  inline const_reverse_iterator rend() const {
338  return const_reverse_iterator(*this,-1);
339  }
340  inline size_t size() const {
341  return m_mat->getColCount();
342  }
343  inline void resize(size_t N) {
344  if (N!=size()) throw std::logic_error("Tried to resize a fixed-size vector");
345  }
346  };
347  template<typename MAT> inline CConstMatrixRowAccessor<MAT> getRowAccessor(const MAT &m,size_t rowIdx) {
348  return CMatrixRowAccessor<MAT>(m,rowIdx);
349  }
350 
351  /** A vector-like wrapper for a const Matrix for accessing the elements of a given row with a [] operator, with offset and custom spacing.
352  * For usage with MRPT's CMatrixTemplate only (for MRPT numeric matrices, use Eigen methods)
353  * \sa CConstMatrixColumnAccessorExtended,CMatrixRowAccessor,CConstMatrixRowAccessor,CMatrixRowAccessorExtended
354  */
355  template<class MAT>
357  protected:
358  const MAT *m_mat;
359  size_t m_rowInd;
360  size_t m_colOffset;
362  size_t howMany;
363  public:
364  typedef typename MAT::Scalar value_type;
366  inline CConstMatrixRowAccessorExtended(const MAT &mat,size_t row,size_t offset,size_t space):m_mat(&mat),m_rowInd(row),m_colOffset(offset),m_elementsSpace(space) {
367  ASSERT_(row<mat.getRowCount());
368  howMany=(mat.getColCount()-m_colOffset)/m_elementsSpace;
369  }
371  inline value_type operator[](size_t i) const {
372  return (*m_mat)(m_rowInd,m_colOffset+(i*m_elementsSpace));
373  }
376  inline const_iterator begin() const {
377  return const_iterator(*this,0);
378  }
379  inline const_iterator end() const {
380  return const_iterator(*this,howMany);
381  }
383  return const_reverse_iterator(*this,howMany-1);
384  }
385  inline const_reverse_iterator rend() const {
386  return const_reverse_iterator(*this,-1);
387  }
388  inline size_t size() const {
389  return howMany;
390  }
391  inline void resize(size_t N) {
392  if (N!=size()) throw std::logic_error("Tried to resize a fixed-size vector");
393  }
394  };
395  template<typename MAT> inline CConstMatrixRowAccessorExtended<MAT> getRowAccessor(const MAT &m,size_t rowIdx,size_t offset,size_t space=1) {
396  return CConstMatrixRowAccessorExtended<MAT>(m,rowIdx,offset,space);
397  }
398 
399 
400  /** A vector-like wrapper for a Matrix for accessing the elements of a given column with a [] operator.
401  * \sa CMatrixRowAccessor,CMatrixColumnAccessorExtended,CConstMatrixColumnAccessor,CConstMatrixColumnAccessorExtended
402  */
403  template <typename MAT> class CMatrixColumnAccessor {
404  protected:
405  MAT *m_mat;
406  size_t m_colInd;
407  public:
408  typedef typename MAT::Scalar value_type;
410  inline CMatrixColumnAccessor(MAT &mat, size_t colIdx) : m_mat(&mat), m_colInd(colIdx) { ASSERT_(colIdx<mat.getColCount()) }
412  inline value_type &operator[](const size_t i) { return (*m_mat)(i,m_colInd); }
413  inline value_type operator[](const size_t i) const { return (*m_mat)(i,m_colInd); }
418  inline iterator begin() {
419  return iterator(*this,0);
420  }
421  inline const_iterator begin() const {
422  return const_iterator(*this,0);
423  }
424  inline iterator end() {
425  return iterator(*this,m_mat->getRowCount());
426  }
427  inline const_iterator end() const {
428  return const_iterator(*this,m_mat->getRowCount());
429  }
430  inline reverse_iterator rbegin() {
431  return reverse_iterator(*this,m_mat->getRowCount()-1);
432  }
433  inline const_reverse_iterator rbegin() const {
434  return const_reverse_iterator(*this,m_mat->getRowCount()-1);
435  }
436  inline reverse_iterator rend() {
437  return reverse_iterator(*this,-1);
438  }
439  inline const_reverse_iterator rend() const {
440  return const_reverse_iterator(*this,-1);
441  }
442  inline size_t size() const {
443  return m_mat->getRowCount();
444  }
445  inline void resize(size_t N) {
446  if (N!=size()) throw std::logic_error("Tried to resize a fixed-size vector");
447  }
448  };
449  template<typename MAT> inline CMatrixColumnAccessor<MAT> getColumnAccessor(MAT &m,size_t colIdx) {
450  return CMatrixColumnAccessor<MAT>(m,colIdx);
451  }
452 
453  /** A vector-like wrapper for a Matrix for accessing the elements of a given column with a [] operator, with offset and custom spacing.
454  * \sa CMatrixRowAccessorExtended,CMatrixColumnAccessor,CConstMatrixColumnAccessor,CConstMatrixColumnAccessorExtended
455  */
456  template<typename MAT>
458  protected:
459  MAT *m_mat;
460  size_t m_colInd;
461  size_t m_rowOffset;
463  size_t howMany;
464  public:
465  typedef typename MAT::Scalar value_type;
467  inline CMatrixColumnAccessorExtended(MAT &mat,size_t col,size_t offset,size_t space):m_mat(&mat),m_colInd(col),m_rowOffset(offset),m_elementsSpace(space) {
468  ASSERT_(col<mat.getColCount());
469  howMany=(mat.getRowCount()-m_rowOffset)/m_elementsSpace;
470  }
472  inline value_type &operator[](size_t i) {
473  return (*m_mat)(m_rowOffset+(i*m_elementsSpace),m_colInd);
474  }
475  inline value_type operator[](size_t i) const {
476  return (*m_mat)(m_rowOffset+(i*m_elementsSpace),m_colInd);
477  }
482  inline iterator begin() {
483  return iterator(*this,0);
484  }
485  inline const_iterator begin() const {
486  return const_iterator(*this,0);
487  }
488  inline iterator end() {
489  return iterator(*this,howMany);
490  }
491  inline const_iterator end() const {
492  return const_iterator(*this,howMany);
493  }
495  return reverse_iterator(*this,howMany-1);
496  }
498  return const_reverse_iterator(*this,howMany-1);
499  }
501  return reverse_iterator(*this,-1);
502  }
503  inline const_reverse_iterator rend() const {
504  return const_reverse_iterator(*this,-1);
505  }
506  inline size_t size() const {
507  return howMany;
508  }
509  inline void resize(size_t N) {
510  if (N!=size()) throw std::logic_error("Tried to resize a fixed-size vector");
511  }
512  };
513  template<typename MAT> inline CMatrixColumnAccessorExtended<MAT> getColumnAccessor(MAT &m,size_t colIdx,size_t offset,size_t space=1) {
514  return CMatrixColumnAccessorExtended<MAT>(m,colIdx,offset,space);
515  }
516 
517  /** A vector-like wrapper for a const Matrix for accessing the elements of a given column with a [] operator.
518  * \sa CConstMatrixRowAccessor,CMatrixColumnAccessorExtended,CMatrixColumnAccessor,CConstMatrixColumnAccessorExtended
519  */
520  template<class MAT>
522  protected:
523  const MAT *m_mat;
524  size_t m_colInd;
525  public:
526  typedef typename MAT::Scalar value_type;
528  inline CConstMatrixColumnAccessor(const MAT &mat,size_t colIdx):m_mat(&mat),m_colInd(colIdx) {
529  ASSERT_(colIdx<mat.getColCount());
530  }
532  inline value_type operator[](size_t i) const {
533  return (*m_mat)(i,m_colInd);
534  }
537  inline const_iterator begin() const {
538  return const_iterator(*this,0);
539  }
540  inline const_iterator end() const {
541  return const_iterator(*this,m_mat->getRowCount());
542  }
544  return const_reverse_iterator(*this,m_mat->getRowCount()-1);
545  }
546  inline const_reverse_iterator rend() const {
547  return const_reverse_iterator(*this,-1);
548  }
549  inline size_t size() const {
550  return m_mat->getRowCount();
551  }
552  inline void resize(size_t N) {
553  if (N!=size()) throw std::logic_error("Tried to resize a fixed-size vector");
554  }
555  };
556  template<typename MAT> inline CConstMatrixColumnAccessor<MAT> getColumnAccessor(const MAT &m,size_t colIdx) {
557  return CConstMatrixColumnAccessor<MAT>(m,colIdx);
558  }
559 
560  /** A vector-like wrapper for a const Matrix for accessing the elements of a given column with a [] operator, with offset and custom spacing.
561  * \sa CConstMatrixRowAccessorExtended,CMatrixColumnAccessor,CConstMatrixColumnAccessor,CMatrixColumnAccessorExtended
562  */
563  template<typename MAT>
565  protected:
566  const MAT *m_mat;
567  size_t m_colInd;
568  size_t m_rowOffset;
570  size_t howMany;
571  public:
572  typedef typename MAT::Scalar value_type;
574  inline CConstMatrixColumnAccessorExtended(const MAT &mat,size_t col,size_t offset,size_t space):m_mat(&mat),m_colInd(col),m_rowOffset(offset),m_elementsSpace(space) {
575  ASSERT_(col<mat.getColCount());
576  howMany=(mat.getRowCount()-m_rowOffset)/m_elementsSpace;
577  }
579  inline value_type operator[](size_t i) const {
580  return (*m_mat)(m_rowOffset+(i*m_elementsSpace),m_colInd);
581  }
584  inline const_iterator begin() const {
585  return const_iterator(*this,0);
586  }
587  inline const_iterator end() const {
588  return const_iterator(*this,howMany);
589  }
591  return const_reverse_iterator(*this,howMany-1);
592  }
593  inline const_reverse_iterator rend() const {
594  return const_reverse_iterator(*this,-1);
595  }
596  inline size_t size() const {
597  return howMany;
598  }
599  inline void resize(size_t N) {
600  if (N!=size()) throw std::logic_error("Tried to resize a fixed-size vector");
601  }
602  };
603  template<typename MAT> inline CConstMatrixColumnAccessorExtended<MAT> getColumnAccessor(const MAT &m,size_t colIdx,size_t offset,size_t space=1) {
604  return CConstMatrixColumnAccessorExtended<MAT>(m,colIdx,offset,space);
605  }
606 
607 
608  } // End of namespace
609 } // End of namespace
610 
611 
612 #endif
CMatrixColumnAccessor< MAT > mrpt_autotype
CMatrixColumnAccessorExtended< MAT > mrpt_autotype
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)
CMatrixRowAccessor< MAT > mrpt_autotype
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...
GLenum GLenum GLvoid * row
Definition: glew.h:2903
value_type operator[](size_t i) const
const_reverse_iterator rend() const
const_reverse_iterator rbegin() const
CConstMatrixRowAccessorExtended(const MAT &mat, size_t row, size_t offset, size_t space)
detail::AccessorIterator< const CConstMatrixColumnAccessorExtended< MAT >, const value_type > const_iterator
detail::AccessorIterator< const CConstMatrixRowAccessorExtended< MAT >, const value_type > const_iterator
detail::ReverseAccessorIterator< const CConstMatrixColumnAccessorExtended< MAT >, const value_type > const_reverse_iterator
int operator-(const AccessorIterator< A, T > &it) const
const_reverse_iterator rend() const
CConstMatrixColumnAccessor< MAT > mrpt_autotype
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...
A vector-like wrapper for a Matrix for accessing the elements of a given column with a [] operator...
bool operator!=(const AccessorIterator< A, T > &it) 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
const_reverse_iterator rbegin() const
detail::AccessorIterator< CMatrixColumnAccessor< MAT >, value_type > iterator
const_reverse_iterator rend() const
ReverseAccessorIterator< A, T > operator--(int)
AccessorIterator< A, T > & operator+=(int off)
A vector-like wrapper for a Matrix for accessing the elements of a given row with a [] operator...
bool operator==(const ReverseAccessorIterator< A, T > &it) const
AccessorIterator< A, T > operator-(int off) const
detail::AccessorIterator< CMatrixRowAccessorExtended< MAT >, value_type > iterator
detail::ReverseAccessorIterator< const CMatrixRowAccessorExtended< MAT >, const value_type > const_reverse_iterator
ReverseAccessorIterator< A, T > & operator++()
ReverseAccessorIterator< A, T > & operator--()
CMatrixRowAccessor< MAT > getRowAccessor(MAT &m, size_t rowIdx)
ReverseAccessorIterator< A, T > operator+(int off) 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 rend() const
AccessorIterator< A, T > operator+(int off) const
detail::ReverseAccessorIterator< CMatrixRowAccessor< MAT >, value_type > reverse_iterator
CConstMatrixRowAccessor< MAT > mrpt_autotype
const_reverse_iterator rend() const
value_type operator[](size_t i) const
CMatrixRowAccessorExtended< MAT > mrpt_autotype
bool operator==(const AccessorIterator< A, T > &it) const
AccessorIterator< A, T > operator-(int off) const
value_type operator[](const size_t i) const
detail::ReverseAccessorIterator< const CConstMatrixRowAccessor< MAT >, const value_type > const_reverse_iterator
GLhandleARB obj
Definition: glew.h:3276
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...
const_reverse_iterator rbegin() const
int operator-(const ReverseAccessorIterator< A, T > &it) const
bool operator!=(const ReverseAccessorIterator< A, T > &it) const
const_reverse_iterator rbegin() const
std::random_access_iterator_tag iterator_category
AccessorIterator< A, T > operator++(int)
detail::AccessorIterator< const CMatrixColumnAccessor< MAT >, const value_type > const_iterator
CConstMatrixRowAccessor(const MAT &mat, size_t row)
CConstMatrixColumnAccessor(const MAT &mat, size_t colIdx)
const_reverse_iterator rend() const
const_iterator begin() const
detail::AccessorIterator< CMatrixColumnAccessorExtended< MAT >, value_type > iterator
This template class provides the basic functionality for a general 2D any-size, resizable container o...
AccessorIterator< A, T > & operator--()
const_reverse_iterator rbegin() const
CConstMatrixRowAccessorExtended< MAT > mrpt_autotype
AccessorIterator< A, T > & operator-=(int off)
Template class for matrix accessor's iterators.
detail::AccessorIterator< const CMatrixRowAccessorExtended< MAT >, const value_type > const_iterator
detail::ReverseAccessorIterator< CMatrixColumnAccessor< MAT >, value_type > reverse_iterator
CMatrixColumnAccessorExtended< MAT > mrpt_autotype
const_iterator begin() const
CMatrixColumnAccessor< MAT > getColumnAccessor(MAT &m, size_t colIdx)
detail::ReverseAccessorIterator< CMatrixColumnAccessorExtended< MAT >, value_type > reverse_iterator
AccessorIterator< A, T > & operator-=(int off)
const_reverse_iterator rend() const
#define ASSERT_(f)
detail::ReverseAccessorIterator< const CConstMatrixRowAccessorExtended< MAT >, const value_type > const_reverse_iterator
value_type & operator[](const size_t i)
const GLdouble * m
Definition: glew.h:5094
CMatrixColumnAccessorExtended(MAT &mat, size_t col, size_t offset, size_t space)
const_reverse_iterator rbegin() const
detail::AccessorIterator< const CConstMatrixColumnAccessor< MAT >, const value_type > const_iterator
Template class for matrix accessor's iterators.
GLintptr offset
Definition: glew.h:1587
ReverseAccessorIterator< A, T > & operator+=(int off)
value_type operator[](size_t i) const
value_type operator[](const size_t i) const
detail::ReverseAccessorIterator< const CMatrixRowAccessor< MAT >, const value_type > const_reverse_iterator
const_reverse_iterator rbegin() const
const_reverse_iterator rbegin() 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
double Scalar
Definition: KmUtils.h:41
detail::ReverseAccessorIterator< CMatrixRowAccessorExtended< MAT >, value_type > reverse_iterator
ReverseAccessorIterator< A, T > operator++(int)
std::random_access_iterator_tag iterator_category
detail::AccessorIterator< const CMatrixRowAccessor< MAT >, const value_type > const_iterator
value_type operator[](size_t i) const
This template class extends the class "CMatrixTemplate" for storing "objects" at each matrix entry...
detail::ReverseAccessorIterator< const CMatrixColumnAccessor< MAT >, const value_type > const_reverse_iterator
detail::AccessorIterator< CMatrixRowAccessor< MAT >, value_type > iterator
CMatrixRowAccessor(MAT &mat, size_t rowIdx)
const_iterator end() 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



Page generated by Doxygen 1.8.6 for MRPT 1.5.6 Git: 4c65e84 Tue Apr 24 08:18:17 2018 +0200 at mar abr 24 08:26:17 CEST 2018