Main MRPT website > C++ reference for MRPT 1.9.9
CMatrixD.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 
13 
14 namespace mrpt
15 {
16 namespace math
17 {
18 /** This class is a "CSerializable" wrapper for
19  * "CMatrixTemplateNumeric<double>".
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  public CMatrixTemplateNumeric<double>
26 {
28  public:
29  /** Constructor */
30  CMatrixD() : CMatrixTemplateNumeric<double>(1, 1) {}
31  /** Constructor */
32  CMatrixD(size_t row, size_t col) : CMatrixTemplateNumeric<double>(row, col)
33  {
34  }
35 
36  /** Copy constructor */
38  : CMatrixTemplateNumeric<double>(m)
39  {
40  }
41 
42  /** Copy constructor */
43  CMatrixD(const CMatrixFloat& m) : CMatrixTemplateNumeric<double>(0, 0)
44  {
45  *this = m.eval().cast<double>();
46  }
47 
48  /*! Assignment operator from any other Eigen class */
49  template <typename OtherDerived>
51  {
53  return *this;
54  }
55  /*! Constructor from any other Eigen class */
56  template <typename OtherDerived>
58  : CMatrixTemplateNumeric<double>(other)
59  {
60  }
61 
63 
64 }; // end of class definition
67 
68 } // End of namespace
69 } // End of namespace
This class is a "CSerializable" wrapper for "CMatrixTemplateNumeric<double>".
Definition: CMatrixD.h:24
CMatrixD(const CMatrixFloat &m)
Copy constructor.
Definition: CMatrixD.h:43
CMatrixD(size_t row, size_t col)
Constructor.
Definition: CMatrixD.h:32
CMatrixD & operator=(const Eigen::MatrixBase< OtherDerived > &other)
Definition: CMatrixD.h:50
#define MRPT_MATRIX_CONSTRUCTORS_FROM_POSES(_CLASS_)
Definition: math_frwds.h:95
std::shared_ptr< CMatrixD > Ptr
Definition: CMatrixD.h:27
CMatrixD()
Constructor.
Definition: CMatrixD.h:30
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
CMatrixD(const CMatrixTemplateNumeric< double > &m)
Copy constructor.
Definition: CMatrixD.h:37
CMatrixD(const Eigen::MatrixBase< OtherDerived > &other)
Definition: CMatrixD.h:57
mrpt::serialization::CArchive & operator>>(mrpt::serialization::CArchive &in, CMatrix::Ptr &pObj)



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