Main MRPT website > C++ reference for MRPT 1.4.0
List of all members | Public Types | Public Member Functions
mrpt::math::CMatrix Class Reference

Detailed Description

This class is a "CSerializable" wrapper for "CMatrixFloat".

Note
For a complete introduction to Matrices and vectors in MRPT, see: http://www.mrpt.org/Matrices_vectors_arrays_and_Linear_Algebra_MRPT_and_Eigen_classes

Definition at line 30 of file CMatrix.h.

#include <mrpt/math/CMatrix.h>

Inheritance diagram for mrpt::math::CMatrix:
Inheritance graph

Public Types

typedef Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic, Eigen::AutoAlign|Eigen::RowMajor > Base
 
typedef CMatrixTemplateNumeric< T > mrpt_autotype
 

Public Member Functions

 CMatrix ()
 Constructor

 
 CMatrix (size_t row, size_t col)
 Constructor

 
 CMatrix (const CMatrixFloat &m)
 Copy constructor.
 
 CMatrix (const CMatrixTemplateNumeric< double > &m)
 Copy constructor.
 
 CMatrix (const TPose2D &p)
 Constructor from a TPose2D, which generates a 3x1 matrix $ [x y \phi]^T $.
 
 CMatrix (const TPose3D &p)
 Constructor from a mrpt::poses::CPose6D, which generates a 6x1 matrix $ [x y z yaw pitch roll]^T $

 
 CMatrix (const TPoint2D &p)
 Constructor from a TPoint2D, which generates a 2x1 matrix $ [x y]^T $

 
 CMatrix (const TPoint3D &p)
 Constructor from a TPoint3D, which generates a 3x1 matrix $ [x y z]^T $.
 
template<class OTHERMAT >
CMatrixoperator= (const OTHERMAT &m)
 Assignment operator for float matrixes.
 
template<typename OtherDerived >
CMatrixoperator= (const Eigen::MatrixBase< OtherDerived > &other)
 
template<typename OtherDerived >
 CMatrix (const Eigen::MatrixBase< OtherDerived > &other)
 
template<typename Derived >
bool operator== (const Eigen::MatrixBase< Derived > &m2) const
 == comparison of two matrices; it differs from default Eigen operator in that returns false if matrices are of different sizes instead of raising an assert.
 
template<typename Derived >
bool operator!= (const Eigen::MatrixBase< Derived > &m2) const
 != comparison of two matrices; it differs from default Eigen operator in that returns true if matrices are of different sizes instead of raising an assert.
 

Protected Member Functions

CSerializable virtual methods
void BASE_IMPEXP writeToStream (mrpt::utils::CStream &out, int *getVersion) const MRPT_OVERRIDE
 
void BASE_IMPEXP readFromStream (mrpt::utils::CStream &in, int version) MRPT_OVERRIDE
 

RTTI stuff <br>

typedef CMatrixPtr SmartPtr
 
static BASE_IMPEXP mrpt::utils::CLASSINIT _init_CMatrix
 
static BASE_IMPEXP mrpt::utils::TRuntimeClassId classCMatrix
 
static BASE_IMPEXP const mrpt::utils::TRuntimeClassIdclassinfo
 
static BASE_IMPEXP const mrpt::utils::TRuntimeClassId_GetBaseClass ()
 
virtual BASE_IMPEXP const mrpt::utils::TRuntimeClassIdGetRuntimeClass () const MRPT_OVERRIDE
 
virtual BASE_IMPEXP mrpt::utils::CObjectduplicate () const MRPT_OVERRIDE
 
static BASE_IMPEXP mrpt::utils::CObjectCreateObject ()
 
static BASE_IMPEXP CMatrixPtr Create ()
 

Member Typedef Documentation

◆ Base

template<class T >
typedef Eigen::Matrix<T,Eigen::Dynamic,Eigen::Dynamic,Eigen::AutoAlign|Eigen::RowMajor> mrpt::math::CMatrixTemplateNumeric< T >::Base
inherited

Definition at line 42 of file CMatrixTemplateNumeric.h.

◆ mrpt_autotype

template<class T >
typedef CMatrixTemplateNumeric<T> mrpt::math::CMatrixTemplateNumeric< T >::mrpt_autotype
inherited

Definition at line 43 of file CMatrixTemplateNumeric.h.

◆ SmartPtr

typedef CMatrixPtr mrpt::math::CMatrix::SmartPtr

A typedef for the associated smart pointer

Definition at line 33 of file CMatrix.h.

Constructor & Destructor Documentation

◆ CMatrix() [1/9]

mrpt::math::CMatrix::CMatrix ( )
inline

Constructor

Definition at line 37 of file CMatrix.h.

◆ CMatrix() [2/9]

mrpt::math::CMatrix::CMatrix ( size_t  row,
size_t  col 
)
inline

Constructor

Definition at line 41 of file CMatrix.h.

◆ CMatrix() [3/9]

mrpt::math::CMatrix::CMatrix ( const CMatrixFloat m)
inline

Copy constructor.

Definition at line 46 of file CMatrix.h.

◆ CMatrix() [4/9]

mrpt::math::CMatrix::CMatrix ( const CMatrixTemplateNumeric< double > &  m)
inline

Copy constructor.

Definition at line 51 of file CMatrix.h.

◆ CMatrix() [5/9]

mrpt::math::CMatrix::CMatrix ( const TPose2D p)
explicit

Constructor from a TPose2D, which generates a 3x1 matrix $ [x y \phi]^T $.

◆ CMatrix() [6/9]

mrpt::math::CMatrix::CMatrix ( const TPose3D p)
explicit

Constructor from a mrpt::poses::CPose6D, which generates a 6x1 matrix $ [x y z yaw pitch roll]^T $

◆ CMatrix() [7/9]

mrpt::math::CMatrix::CMatrix ( const TPoint2D p)
explicit

Constructor from a TPoint2D, which generates a 2x1 matrix $ [x y]^T $

◆ CMatrix() [8/9]

mrpt::math::CMatrix::CMatrix ( const TPoint3D p)
explicit

Constructor from a TPoint3D, which generates a 3x1 matrix $ [x y z]^T $.

◆ CMatrix() [9/9]

template<typename OtherDerived >
mrpt::math::CMatrix::CMatrix ( const Eigen::MatrixBase< OtherDerived > &  other)
inline

Constructor from any other Eigen class

Definition at line 82 of file CMatrix.h.

Member Function Documentation

◆ _GetBaseClass()

static BASE_IMPEXP const mrpt::utils::TRuntimeClassId * mrpt::math::CMatrix::_GetBaseClass ( )
staticprotected

◆ Create()

static BASE_IMPEXP CMatrixPtr mrpt::math::CMatrix::Create ( )
static

◆ CreateObject()

static BASE_IMPEXP mrpt::utils::CObject * mrpt::math::CMatrix::CreateObject ( )
static

◆ duplicate()

virtual BASE_IMPEXP mrpt::utils::CObject * mrpt::math::CMatrix::duplicate ( ) const
virtual

◆ GetRuntimeClass()

virtual BASE_IMPEXP const mrpt::utils::TRuntimeClassId * mrpt::math::CMatrix::GetRuntimeClass ( ) const
virtual

◆ operator!=()

template<class T >
template<typename Derived >
bool mrpt::math::CMatrixTemplateNumeric< T >::operator!= ( const Eigen::MatrixBase< Derived > &  m2) const
inlineinherited

!= comparison of two matrices; it differs from default Eigen operator in that returns true if matrices are of different sizes instead of raising an assert.

Definition at line 115 of file CMatrixTemplateNumeric.h.

◆ operator=() [1/2]

template<typename OtherDerived >
CMatrix & mrpt::math::CMatrix::operator= ( const Eigen::MatrixBase< OtherDerived > &  other)
inline

Assignment operator from any other Eigen class

Definition at line 76 of file CMatrix.h.

References mrpt::math::CMatrixTemplateNumeric< T >::operator=().

◆ operator=() [2/2]

template<class OTHERMAT >
CMatrix & mrpt::math::CMatrix::operator= ( const OTHERMAT &  m)
inline

Assignment operator for float matrixes.

Definition at line 68 of file CMatrix.h.

References mrpt::math::CMatrixTemplateNumeric< T >::operator=().

◆ operator==()

template<class T >
template<typename Derived >
bool mrpt::math::CMatrixTemplateNumeric< T >::operator== ( const Eigen::MatrixBase< Derived > &  m2) const
inlineinherited

== comparison of two matrices; it differs from default Eigen operator in that returns false if matrices are of different sizes instead of raising an assert.

Definition at line 107 of file CMatrixTemplateNumeric.h.

◆ readFromStream()

void BASE_IMPEXP mrpt::math::CMatrix::readFromStream ( mrpt::utils::CStream in,
int  version 
)
protected

◆ writeToStream()

void BASE_IMPEXP mrpt::math::CMatrix::writeToStream ( mrpt::utils::CStream out,
int *  getVersion 
) const
protected

Member Data Documentation

◆ _init_CMatrix

BASE_IMPEXP mrpt::utils::CLASSINIT mrpt::math::CMatrix::_init_CMatrix
staticprotected

Definition at line 33 of file CMatrix.h.

◆ classCMatrix

BASE_IMPEXP mrpt::utils::TRuntimeClassId mrpt::math::CMatrix::classCMatrix
static

Definition at line 33 of file CMatrix.h.

◆ classinfo

BASE_IMPEXP const mrpt::utils::TRuntimeClassId* mrpt::math::CMatrix::classinfo
static

Definition at line 33 of file CMatrix.h.




Page generated by Doxygen 1.9.6 for MRPT 1.4.0 SVN: at Wed Mar 22 06:31:24 UTC 2023