Main MRPT website > C++ reference
MRPT logo
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Static Protected Member Functions | Static Protected Attributes
mrpt::math::CMatrixD Class Reference

Detailed Description

This class is a "CSerializable" wrapper for "CMatrixTemplateNumeric<double>".

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 52 of file CMatrixD.h.

#include <mrpt/math/CMatrixD.h>

Inheritance diagram for mrpt::math::CMatrixD:
Inheritance graph
[legend]

Public Types

typedef CMatrixDPtr SmartPtr
 
typedef Eigen::Matrix< double,
Eigen::Dynamic, Eigen::Dynamic,
Eigen::AutoAlign|Eigen::RowMajor > 
Base
 
typedef CMatrixTemplateNumeric
< double > 
mrpt_autotype
 

Public Member Functions

virtual BASE_IMPEXP const
mrpt::utils::TRuntimeClassId
GetRuntimeClass () const
 Returns information about the class of an object in runtime.
 
virtual BASE_IMPEXP
mrpt::utils::CObject
duplicate () const
 Returns a copy of the object, indepently of its class.
 
 CMatrixD ()
 Constructor.
 
 CMatrixD (size_t row, size_t col)
 Constructor.
 
 CMatrixD (const CMatrixTemplateNumeric< double > &m)
 Copy constructor.
 
 CMatrixD (const CMatrixFloat &m)
 Copy constructor.
 
template<typename OtherDerived >
CMatrixDoperator= (const Eigen::MatrixBase< OtherDerived > &other)
 
template<typename OtherDerived >
 CMatrixD (const Eigen::MatrixBase< OtherDerived > &other)
 
 CMatrixD (const TPose2D &p)
 Constructor from a TPose2D, which generates a 3x1 matrix $ [x y \phi]^T $.
 
 CMatrixD (const TPose3D &p)
 Constructor from a TPose3D, which generates a 6x1 matrix $ [x y z yaw pitch roll]^T $.
 
 CMatrixD (const TPoint2D &p)
 Constructor from a TPoint2D, which generates a 2x1 matrix $ [x y]^T $.
 
 CMatrixD (const TPoint3D &p)
 Constructor from a mrpt::poses::CPoint3D, which generates a 3x1 matrix $ [x y z]^T $.
 
template<class OTHERMAT >
CMatrixDoperator= (const OTHERMAT &m)
 Assignment operator for float matrixes.
 
mrpt::utils::CObjectPtr duplicateGetSmartPtr () const
 Returns a copy of the object, indepently of its class, as a smart pointer (the newly created object will exist as long as any copy of this smart pointer).
 
CObject * clone () const
 Cloning interface for smart pointers.
 

Static Public Member Functions

static BASE_IMPEXP
mrpt::utils::CObject
CreateObject ()
 
static BASE_IMPEXP CMatrixDPtr Create ()
 

Static Public Attributes

static BASE_IMPEXP
mrpt::utils::TRuntimeClassId 
classCMatrixD
 
static BASE_IMPEXP const
mrpt::utils::TRuntimeClassId
classinfo
 
static const
mrpt::utils::TRuntimeClassId 
classCObject
 
RTTI stuff
static const
mrpt::utils::TRuntimeClassId 
classCSerializable
 

Protected Member Functions

CSerializable virtual methods
BASE_IMPEXP void writeToStream (mrpt::utils::CStream &out, int *getVersion) const
 Introduces a pure virtual method responsible for writing to a CStream.
 
BASE_IMPEXP void readFromStream (mrpt::utils::CStream &in, int version)
 Introduces a pure virtual method responsible for loading from a CStream This can not be used directly be users, instead use "stream >> object;" for reading it from a stream or "stream >> object_ptr;" if the class is unknown apriori.
 

Static Protected Member Functions

static const
mrpt::utils::TRuntimeClassId
_GetBaseClass ()
 

Static Protected Attributes

static mrpt::utils::CLASSINIT _init_CMatrixD
 

Member Typedef Documentation

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

Definition at line 73 of file CMatrixTemplateNumeric.h.

Definition at line 74 of file CMatrixTemplateNumeric.h.

A typedef for the associated smart pointer

Definition at line 62 of file CMatrixD.h.

Constructor & Destructor Documentation

mrpt::math::CMatrixD::CMatrixD ( )
inline

Constructor.

Definition at line 78 of file CMatrixD.h.

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

Constructor.

Definition at line 82 of file CMatrixD.h.

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

Copy constructor.

Definition at line 86 of file CMatrixD.h.

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

Copy constructor.

Definition at line 91 of file CMatrixD.h.

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

Constructor from any other Eigen class

Definition at line 104 of file CMatrixD.h.

mrpt::math::CMatrixD::CMatrixD ( const TPose2D p)
inlineexplicit

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

Definition at line 108 of file CMatrixD.h.

mrpt::math::CMatrixD::CMatrixD ( const TPose3D p)
inlineexplicit

Constructor from a TPose3D, which generates a 6x1 matrix $ [x y z yaw pitch roll]^T $.

Definition at line 112 of file CMatrixD.h.

mrpt::math::CMatrixD::CMatrixD ( const TPoint2D p)
inlineexplicit

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

Definition at line 116 of file CMatrixD.h.

mrpt::math::CMatrixD::CMatrixD ( const TPoint3D p)
inlineexplicit

Constructor from a mrpt::poses::CPoint3D, which generates a 3x1 matrix $ [x y z]^T $.

Definition at line 120 of file CMatrixD.h.

Member Function Documentation

static const mrpt::utils::TRuntimeClassId* mrpt::math::CMatrixD::_GetBaseClass ( )
staticprotected
CObject* mrpt::utils::CObject::clone ( ) const
inlineinherited

Cloning interface for smart pointers.

Definition at line 154 of file CObject.h.

static BASE_IMPEXP CMatrixDPtr mrpt::math::CMatrixD::Create ( )
static
static BASE_IMPEXP mrpt::utils::CObject* mrpt::math::CMatrixD::CreateObject ( )
static
virtual BASE_IMPEXP mrpt::utils::CObject* mrpt::math::CMatrixD::duplicate ( ) const
virtual

Returns a copy of the object, indepently of its class.

Implements mrpt::utils::CObject.

mrpt::utils::CObjectPtr mrpt::utils::CObject::duplicateGetSmartPtr ( ) const
inlineinherited

Returns a copy of the object, indepently of its class, as a smart pointer (the newly created object will exist as long as any copy of this smart pointer).

Definition at line 151 of file CObject.h.

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

Returns information about the class of an object in runtime.

Reimplemented from mrpt::utils::CSerializable.

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

Assignment operator from any other Eigen class

Definition at line 98 of file CMatrixD.h.

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

Assignment operator for float matrixes.

Definition at line 126 of file CMatrixD.h.

BASE_IMPEXP void mrpt::math::CMatrixD::readFromStream ( mrpt::utils::CStream in,
int  version 
)
protectedvirtual

Introduces a pure virtual method responsible for loading from a CStream This can not be used directly be users, instead use "stream >> object;" for reading it from a stream or "stream >> object_ptr;" if the class is unknown apriori.

Parameters
inThe input binary stream where the object data must read from.
versionThe version of the object stored in the stream: use this version number in your code to know how to read the incoming data.
Exceptions
std::exceptionOn any error, see CStream::ReadBuffer
See Also
CStream

Implements mrpt::utils::CSerializable.

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

Introduces a pure virtual method responsible for writing to a CStream.

This can not be used directly be users, instead use "stream << object;" for writing it to a stream.

Parameters
outThe output binary stream where object must be dumped.
getVersionIf NULL, the object must be dumped. If not, only the version of the object dump must be returned in this pointer. This enables the versioning of objects dumping and backward compatibility with previously stored data.
Exceptions
std::exceptionOn any error, see CStream::WriteBuffer
See Also
CStream

Implements mrpt::utils::CSerializable.

Member Data Documentation

mrpt::utils::CLASSINIT mrpt::math::CMatrixD::_init_CMatrixD
staticprotected

Definition at line 59 of file CMatrixD.h.

BASE_IMPEXP mrpt::utils::TRuntimeClassId mrpt::math::CMatrixD::classCMatrixD
static

Definition at line 63 of file CMatrixD.h.

const mrpt::utils::TRuntimeClassId mrpt::utils::CObject::classCObject
staticinherited

Definition at line 139 of file CObject.h.

const mrpt::utils::TRuntimeClassId mrpt::utils::CSerializable::classCSerializable
staticinherited

Definition at line 56 of file CSerializable.h.

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

Definition at line 64 of file CMatrixD.h.




Page generated by Doxygen 1.8.3 for MRPT 0.9.6 SVN: at Fri Feb 15 22:05:02 EST 2013