MRPT  1.9.9
CMatrix.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 #pragma once
10 
14 
15 namespace mrpt::math
16 {
17 /** This class is a "CSerializable" wrapper for "CMatrixFloat".
18  * \note For a complete introduction to Matrices and vectors in MRPT, see:
19  * http://www.mrpt.org/Matrices_vectors_arrays_and_Linear_Algebra_MRPT_and_Eigen_classes
20  * \ingroup mrpt_math_grp
21  */
23 {
25 
26  public:
27  /** Constructor */
28  CMatrix() : CMatrixFloat(1, 1) {}
29  /** Constructor */
30  CMatrix(size_t row, size_t col) : CMatrixFloat(row, col) {}
31  /** Copy constructor
32  */
33  CMatrix(const CMatrixFloat& m) : CMatrixFloat(m) {}
34  /** Copy constructor
35  */
37  {
38  *this = m.eval().cast<float>();
39  }
41 
42  /** Assignment operator for float matrixes
43  */
44  template <class OTHERMAT>
45  inline CMatrix& operator=(const OTHERMAT& m)
46  {
47  CMatrixFloat::operator=(m);
48  return *this;
49  }
50 
51  /*! Assignment operator from any other Eigen class */
52  template <typename OtherDerived>
54  {
56  return *this;
57  }
58  /*! Constructor from any other Eigen class */
59  template <typename OtherDerived>
61  : CMatrixTemplateNumeric<float>(other)
62  {
63  }
64 
65 }; // end of class definition
68 
69 }
70 
CMatrix()
Constructor.
Definition: CMatrix.h:28
std::shared_ptr< CMatrix > Ptr
Definition: CMatrix.h:24
This base provides a set of functions for maths stuff.
CMatrix & operator=(const OTHERMAT &m)
Assignment operator for float matrixes.
Definition: CMatrix.h:45
CMatrix(size_t row, size_t col)
Constructor.
Definition: CMatrix.h:30
#define MRPT_MATRIX_CONSTRUCTORS_FROM_POSES(_CLASS_)
Definition: math_frwds.h:95
CMatrix(const CMatrixTemplateNumeric< double > &m)
Copy constructor.
Definition: CMatrix.h:36
CMatrix(const Eigen::MatrixBase< OtherDerived > &other)
Definition: CMatrix.h:60
CMatrix & operator=(const Eigen::MatrixBase< OtherDerived > &other)
Definition: CMatrix.h:53
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
Virtual base class for "archives": classes abstracting I/O streams.
Definition: CArchive.h:52
GLenum GLenum GLvoid * row
Definition: glext.h:3576
GLuint in
Definition: glext.h:7274
The virtual base class which provides a unified interface for all persistent objects in MRPT...
Definition: CSerializable.h:30
This class is a "CSerializable" wrapper for "CMatrixFloat".
Definition: CMatrix.h:22
mrpt::serialization::CArchive & operator>>(mrpt::serialization::CArchive &in, CMatrix::Ptr &pObj)
CMatrix(const CMatrixFloat &m)
Copy constructor.
Definition: CMatrix.h:33



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