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-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 CMATRIXD_H
10 #define CMATRIXD_H
11 
14 
15 namespace mrpt
16 {
17 namespace math
18 {
19 /** This class is a "CSerializable" wrapper for
20  * "CMatrixTemplateNumeric<double>".
21  * \note For a complete introduction to Matrices and vectors in MRPT, see:
22  * http://www.mrpt.org/Matrices_vectors_arrays_and_Linear_Algebra_MRPT_and_Eigen_classes
23  * \ingroup mrpt_base_grp
24  */
26  public CMatrixTemplateNumeric<double>
27 {
29  public:
30  /** Constructor */
31  CMatrixD() : CMatrixTemplateNumeric<double>(1, 1) {}
32  /** Constructor */
33  CMatrixD(size_t row, size_t col) : CMatrixTemplateNumeric<double>(row, col)
34  {
35  }
36 
37  /** Copy constructor */
39  : CMatrixTemplateNumeric<double>(m)
40  {
41  }
42 
43  /** Copy constructor */
44  CMatrixD(const CMatrixFloat& m) : CMatrixTemplateNumeric<double>(0, 0)
45  {
46  *this = m.eval().cast<double>();
47  }
48 
49  /*! Assignment operator from any other Eigen class */
50  template <typename OtherDerived>
51  inline CMatrixD& operator=(const Eigen::MatrixBase<OtherDerived>& other)
52  {
54  return *this;
55  }
56  /*! Constructor from any other Eigen class */
57  template <typename OtherDerived>
58  inline CMatrixD(const Eigen::MatrixBase<OtherDerived>& other)
59  : CMatrixTemplateNumeric<double>(other)
60  {
61  }
62 
63  /** Constructor from a TPose2D, which generates a 3x1 matrix \f$ [x y
64  * \phi]^T \f$ */
65  explicit CMatrixD(const TPose2D& p);
66  /** Constructor from a TPose3D, which generates a 6x1 matrix \f$ [x y z yaw
67  * pitch roll]^T \f$ */
68  explicit CMatrixD(const TPose3D& p);
69  /** Constructor from a TPoint2D, which generates a 2x1 matrix \f$ [x y]^T
70  * \f$ */
71  explicit CMatrixD(const TPoint2D& p);
72  /** Constructor from a TPoint3D, which generates a 3x1 matrix \f$ [x y z]^T
73  * \f$ */
74  explicit CMatrixD(const TPoint3D& p);
75 
76 }; // end of class definition
78 
79 } // End of namespace
80 } // End of namespace
81 
82 #endif
This class is a "CSerializable" wrapper for "CMatrixTemplateNumeric<double>".
Definition: CMatrixD.h:25
The virtual base class which provides a unified interface for all persistent objects in MRPT...
Definition: CSerializable.h:44
CMatrixD(const CMatrixFloat &m)
Copy constructor.
Definition: CMatrixD.h:44
CMatrixD(size_t row, size_t col)
Constructor.
Definition: CMatrixD.h:33
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
Definition: CStream.h:41
CMatrixD & operator=(const Eigen::MatrixBase< OtherDerived > &other)
Definition: CMatrixD.h:51
std::shared_ptr< CMatrixD > Ptr
Definition: CMatrixD.h:28
CMatrixD()
Constructor.
Definition: CMatrixD.h:31
mrpt::utils::CStream & operator>>(mrpt::utils::CStream &in, CMatrix::Ptr &pObj)
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...
GLenum GLenum GLvoid * row
Definition: glext.h:3576
Lightweight 3D pose (three spatial coordinates, plus three angular coordinates).
GLuint in
Definition: glext.h:7274
Lightweight 2D pose.
CMatrixD(const CMatrixTemplateNumeric< double > &m)
Copy constructor.
Definition: CMatrixD.h:38
Lightweight 3D point.
CMatrixD(const Eigen::MatrixBase< OtherDerived > &other)
Definition: CMatrixD.h:58
Lightweight 2D point.
GLfloat GLfloat p
Definition: glext.h:6305



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: ae4571287 Thu Nov 23 00:06:53 2017 +0100 at dom oct 27 23:51:55 CET 2019