Main MRPT website > C++ reference for 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
16 {
17 namespace math
18 {
19 /** This class is a "CSerializable" wrapper for "CMatrixFloat".
20  * \note For a complete introduction to Matrices and vectors in MRPT, see:
21  * http://www.mrpt.org/Matrices_vectors_arrays_and_Linear_Algebra_MRPT_and_Eigen_classes
22  * \ingroup mrpt_math_grp
23  */
25 {
27 
28  public:
29  /** Constructor */
30  CMatrix() : CMatrixFloat(1, 1) {}
31  /** Constructor */
32  CMatrix(size_t row, size_t col) : CMatrixFloat(row, col) {}
33  /** Copy constructor
34  */
35  CMatrix(const CMatrixFloat& m) : CMatrixFloat(m) {}
36  /** Copy constructor
37  */
39  {
40  *this = m.eval().cast<float>();
41  }
43 
44  /** Assignment operator for float matrixes
45  */
46  template <class OTHERMAT>
47  inline CMatrix& operator=(const OTHERMAT& m)
48  {
49  CMatrixFloat::operator=(m);
50  return *this;
51  }
52 
53  /*! Assignment operator from any other Eigen class */
54  template <typename OtherDerived>
56  {
58  return *this;
59  }
60  /*! Constructor from any other Eigen class */
61  template <typename OtherDerived>
63  : CMatrixTemplateNumeric<float>(other)
64  {
65  }
66 
67 }; // end of class definition
70 
71 } // End of namespace
72 } // End of namespace
CMatrix()
Constructor.
Definition: CMatrix.h:30
std::shared_ptr< CMatrix > Ptr
Definition: CMatrix.h:26
CMatrix & operator=(const OTHERMAT &m)
Assignment operator for float matrixes.
Definition: CMatrix.h:47
CMatrix(size_t row, size_t col)
Constructor.
Definition: CMatrix.h:32
#define MRPT_MATRIX_CONSTRUCTORS_FROM_POSES(_CLASS_)
Definition: math_frwds.h:95
CMatrix(const CMatrixTemplateNumeric< double > &m)
Copy constructor.
Definition: CMatrix.h:38
CMatrix(const Eigen::MatrixBase< OtherDerived > &other)
Definition: CMatrix.h:62
CMatrix & operator=(const Eigen::MatrixBase< OtherDerived > &other)
Definition: CMatrix.h:55
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
#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:48
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:32
This class is a "CSerializable" wrapper for "CMatrixFloat".
Definition: CMatrix.h:24
mrpt::serialization::CArchive & operator>>(mrpt::serialization::CArchive &in, CMatrix::Ptr &pObj)
CMatrix(const CMatrixFloat &m)
Copy constructor.
Definition: CMatrix.h:35



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at lun oct 28 00:14:14 CET 2019