MRPT  1.9.9
CMatrix.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | https://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2019, Individual contributors, see AUTHORS file |
6  | See: https://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See: https://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  * https://www.mrpt.org/Matrices_vectors_arrays_and_Linear_Algebra_MRPT_and_Eigen_classes
20  * \ingroup mrpt_math_grp
21  */
23 {
26 
27  public:
28  /** Constructor */
29  CMatrix() : CMatrixFloat(1, 1) {}
30  /** Constructor */
31  CMatrix(size_t row, size_t col) : CMatrixFloat(row, col) {}
32  /** Copy constructor
33  */
34  CMatrix(const CMatrixFloat& m) : CMatrixFloat(m) {}
35  /** Copy constructor
36  */
38  {
39  *this = m.eval().cast<float>();
40  }
42 
43  /** Assignment operator for float matrixes
44  */
45  template <class OTHERMAT>
46  inline CMatrix& operator=(const OTHERMAT& m)
47  {
48  CMatrixFloat::operator=(m);
49  return *this;
50  }
51 
52  /*! Assignment operator from any other Eigen class */
53  template <typename OtherDerived>
55  {
57  return *this;
58  }
59  /*! Constructor from any other Eigen class */
60  template <typename OtherDerived>
62  : CMatrixTemplateNumeric<float>(other)
63  {
64  }
65 
66 }; // end of class definition
69 
70 } // namespace mrpt::math
#define DEFINE_SCHEMA_SERIALIZABLE()
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
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:46
CMatrix(size_t row, size_t col)
Constructor.
Definition: CMatrix.h:31
#define MRPT_MATRIX_CONSTRUCTORS_FROM_POSES(_CLASS_)
Definition: math_frwds.h:94
CMatrix(const CMatrixTemplateNumeric< double > &m)
Copy constructor.
Definition: CMatrix.h:37
CMatrix(const Eigen::MatrixBase< OtherDerived > &other)
Definition: CMatrix.h:61
CMatrix & operator=(const Eigen::MatrixBase< OtherDerived > &other)
Definition: CMatrix.h:54
#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:3580
GLuint in
Definition: glext.h:7391
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:34



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 58f856185 Mon May 20 11:43:57 2019 +0200 at lun may 20 11:50:17 CEST 2019