MRPT  2.0.0
CMatrixD.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-2020, 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
18  * "CMatrixDynamic<double>".
19  * \note For a complete introduction to Matrices and vectors in MRPT, see:
20  * https://www.mrpt.org/Matrices_vectors_arrays_and_Linear_Algebra_MRPT_and_Eigen_classes
21  * \ingroup mrpt_math_grp
22  */
24  public CMatrixDynamic<double>
25 {
28  public:
29  using Base = CMatrixDynamic<double>;
30 
31  /** Constructor */
32  CMatrixD() : Base(1, 1) {}
33  /** Constructor */
34  CMatrixD(size_t row, size_t col) : Base(row, col) {}
35 
36  /** Copy constructor */
37  explicit CMatrixD(const Base& m) : Base(m) {}
38 
39  /** Copy constructor */
40  explicit CMatrixD(const CMatrixFloat& m) : Base(0, 0) { *this = m; }
41 
42  /*! Assignment operator from any other Eigen class */
43  template <typename Other>
44  inline CMatrixD& operator=(const Other& other)
45  {
46  Base::operator=(other);
47  return *this;
48  }
49  /*! Constructor from any other Eigen class */
50  template <class Other>
51  explicit CMatrixD(const Other& other)
52  {
53  Base::operator=(other);
54  }
55 
57 
58 }; // end of class definition
61 
62 } // namespace mrpt::math
std::shared_ptr< mrpt::math ::CMatrixD > Ptr
Definition: CMatrixD.h:26
This class is a "CSerializable" wrapper for "CMatrixDynamic<double>".
Definition: CMatrixD.h:23
auto col(int colIdx)
Definition: MatrixBase.h:89
CMatrixD(const Other &other)
Definition: CMatrixD.h:51
CMatrixD(const CMatrixFloat &m)
Copy constructor.
Definition: CMatrixD.h:40
CMatrixD(size_t row, size_t col)
Constructor.
Definition: CMatrixD.h:34
CMatrixD(const Base &m)
Copy constructor.
Definition: CMatrixD.h:37
#define DEFINE_SCHEMA_SERIALIZABLE()
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
mrpt::serialization::CArchive & operator>>(mrpt::serialization::CArchive &in, CMatrixD::Ptr &pObj)
This base provides a set of functions for maths stuff.
auto row(int rowIdx)
Definition: MatrixBase.h:100
CMatrixDynamic & operator=(const CMatrixDynamic< double > &m)=default
Virtual base class for "archives": classes abstracting I/O streams.
Definition: CArchive.h:54
The virtual base class which provides a unified interface for all persistent objects in MRPT...
Definition: CSerializable.h:30
#define DEFINE_SERIALIZABLE(class_name, NS)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
#define MRPT_MATRIX_CONSTRUCTORS_FROM_POSES(_CLASS_)
This template class provides the basic functionality for a general 2D any-size, resizable container o...
CMatrixD & operator=(const Other &other)
Definition: CMatrixD.h:44



Page generated by Doxygen 1.8.14 for MRPT 2.0.0 Git: b38439d21 Tue Mar 31 19:58:06 2020 +0200 at miƩ abr 1 00:50:30 CEST 2020