Main MRPT website > C++ reference
MRPT logo
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions
mrpt::poses::CPose3DPDFGaussianInf Class Reference

Detailed Description

Declares a class that represents a Probability Density function (PDF) of a 3D pose $ p(\mathbf{x}) = [x ~ y ~ z ~ yaw ~ pitch ~ roll]^t $ as a Gaussian described by its mean and its inverse covariance matrix.

This class implements that PDF using a mono-modal Gaussian distribution in "information" form (inverse covariance matrix).

Uncertainty of pose composition operations ( $ y = x \oplus u $) is implemented in the method "CPose3DPDFGaussianInf::operator+=".

For further details on implemented methods and the theory behind them, see this report.

See also:
CPose3D, CPose3DPDF, CPose3DPDFParticles, CPose3DPDFGaussian

#include <mrpt/poses/CPose3DPDFGaussianInf.h>

Inheritance diagram for mrpt::poses::CPose3DPDFGaussianInf:
Inheritance graph
[legend]

List of all members.

Public Types

enum  { is_3D_val = 1 }
enum  { is_PDF_val = 1 }
typedef TDATA type_value
 The type of the state the PDF represents.

Public Member Functions

const CPose3DgetPoseMean () const
CPose3DgetPoseMean ()
 CPose3DPDFGaussianInf ()
 Default constructor - mean: all zeros, inverse covariance=all zeros -> so be careful!
 CPose3DPDFGaussianInf (const CPose3D &init_Mean)
 Constructor with a mean value, inverse covariance=all zeros -> so be careful!
 CPose3DPDFGaussianInf (TConstructorFlags_Poses constructor_dummy_param)
 Uninitialized constructor: leave all fields uninitialized - Call with UNINITIALIZED_POSE as argument.
 CPose3DPDFGaussianInf (const CPose3D &init_Mean, const CMatrixDouble66 &init_CovInv)
 Constructor with mean and inv cov.
 CPose3DPDFGaussianInf (const CPose3DQuatPDFGaussian &o)
 Constructor from a 6D pose PDF described as a Quaternion.
void getMean (CPose3D &mean_pose) const
 Returns an estimate of the pose, (the mean, or mathematical expectation of the PDF).
void getCovarianceAndMean (CMatrixDouble66 &cov, CPose3D &mean_point) const
 Returns an estimate of the pose covariance matrix (6x6 cov matrix) and the mean, both at once.
void copyFrom (const CPose3DPDF &o)
 Copy operator, translating if necesary (for example, between particles and gaussian representations)
void copyFrom (const CPosePDF &o)
 Copy operator, translating if necesary (for example, between particles and gaussian representations)
void copyFrom (const CPose3DQuatPDFGaussian &o)
 Copy from a 6D pose PDF described as a Quaternion.
void saveToTextFile (const std::string &file) const
 Save the PDF to a text file, containing the 3D pose in the first line, then the covariance matrix in next 3 lines.
void changeCoordinatesReference (const CPose3D &newReferenceBase)
 This can be used to convert a PDF from local coordinates to global, providing the point (newReferenceBase) from which "to project" the current pdf.
void drawSingleSample (CPose3D &outPart) const
 Draws a single sample from the distribution.
void drawManySamples (size_t N, std::vector< vector_double > &outSamples) const
 Draws a number of samples from the distribution, and saves as a list of 1x6 vectors, where each row contains a (x,y,phi) datum.
void bayesianFusion (const CPose3DPDF &p1, const CPose3DPDF &p2)
 Bayesian fusion of two points gauss.
void inverse (CPose3DPDF &o) const
 Returns a new PDF such as: NEW_PDF = (0,0,0) - THIS_PDF.
CPose3DPDFGaussianInf operator- () const
 Unary - operator, returns the PDF of the inverse pose.
void operator+= (const CPose3D &Ap)
 Makes: thisPDF = thisPDF + Ap, where "+" is pose composition (both the mean, and the covariance matrix are updated).
void operator+= (const CPose3DPDFGaussianInf &Ap)
 Makes: thisPDF = thisPDF + Ap, where "+" is pose composition (both the mean, and the covariance matrix are updated).
void operator-= (const CPose3DPDFGaussianInf &Ap)
 Makes: thisPDF = thisPDF - Ap, where "-" is pose inverse composition (both the mean, and the covariance matrix are updated).
double evaluatePDF (const CPose3D &x) const
 Evaluates the PDF at a given point.
double evaluateNormalizedPDF (const CPose3D &x) const
 Evaluates the ratio PDF(x) / PDF(MEAN), that is, the normalized PDF in the range [0,1].
double mahalanobisDistanceTo (const CPose3DPDFGaussianInf &theOther)
 Computes the Mahalanobis distance between the centers of two Gaussians.
void getInvCovSubmatrix2D (CMatrixDouble &out_cov) const
 Returns a 3x3 matrix with submatrix of the inverse covariance for the variables (x,y,yaw) only.
template<class OPENGL_SETOFOBJECTSPTR >
void getAs3DObject (OPENGL_SETOFOBJECTSPTR &out_obj) const
 Returns a 3D representation of this PDF.
template<class OPENGL_SETOFOBJECTSPTR >
OPENGL_SETOFOBJECTSPTR getAs3DObject () const
 Returns a 3D representation of this PDF.
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).
CObjectclone () const
 Cloning interface for smart pointers.
virtual void getMean (TDATA &mean_point) const =0
 Returns the mean, or mathematical expectation of the probability density distribution (PDF).
virtual void getCovarianceAndMean (CMatrixFixedNumeric< double, STATE_LEN, STATE_LEN > &cov, TDATA &mean_point) const =0
 Returns an estimate of the pose covariance matrix (STATE_LENxSTATE_LEN cov matrix) and the mean, both at once.
void getCovarianceDynAndMean (CMatrixDouble &cov, TDATA &mean_point) const
 Returns an estimate of the pose covariance matrix (STATE_LENxSTATE_LEN cov matrix) and the mean, both at once.
TDATA getMeanVal () const
 Returns the mean, or mathematical expectation of the probability density distribution (PDF).
void getCovariance (CMatrixDouble &cov) const
 Returns the estimate of the covariance matrix (STATE_LEN x STATE_LEN covariance matrix)
void getCovariance (CMatrixFixedNumeric< double, STATE_LEN, STATE_LEN > &cov) const
 Returns the estimate of the covariance matrix (STATE_LEN x STATE_LEN covariance matrix)
CMatrixFixedNumeric< double,
STATE_LEN, STATE_LEN > 
getCovariance () const
 Returns the estimate of the covariance matrix (STATE_LEN x STATE_LEN covariance matrix)
virtual void drawSingleSample (TDATA &outPart) const =0
 Draws a single sample from the distribution.
double getCovarianceEntropy () const
 Compute the entropy of the estimated covariance matrix.

Static Public Member Functions

static void jacobiansPoseComposition (const CPose3D &x, const CPose3D &u, CMatrixDouble66 &df_dx, CMatrixDouble66 &df_du)
 This static method computes the pose composition Jacobians, with these formulas:
static CPose3DPDFcreateFrom2D (const CPosePDF &o)
 This is a static transformation method from 2D poses to 3D PDFs, preserving the representation type (particles->particles, Gaussians->Gaussians,etc) It returns a new object of any of the derived classes of CPose3DPDF.
static bool is_3D ()
static bool is_PDF ()

Public Attributes

Data fields
CPose3D mean
 The mean value.
CMatrixDouble66 cov_inv
 The inverse of the 6x6 covariance matrix.

Static Public Attributes

static const
mrpt::utils::TRuntimeClassId 
classCObject
static const size_t state_length
 The length of the variable, for example, 3 for a 3D point, 6 for a 3D pose (x y z yaw pitch roll).
RTTI stuff
static const
mrpt::utils::TRuntimeClassId 
classCSerializable

Protected Member Functions

void assureSymmetry ()
 Assures the symmetry of the covariance matrix (eventually certain operations in the math-coprocessor lead to non-symmetric matrixes!)
virtual void writeToStream (mrpt::utils::CStream &out, int *getVersion) const =0
 Introduces a pure virtual method responsible for writing to a CStream.
virtual void readFromStream (mrpt::utils::CStream &in, int version)=0
 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.

RTTI stuff

static const
mrpt::utils::TRuntimeClassId 
classCPose3DPDF
class mrpt::utils::CStream

RTTI stuff

typedef CPose3DPDFGaussianInfPtr SmartPtr
static mrpt::utils::CLASSINIT _init_CPose3DPDFGaussianInf
static mrpt::utils::TRuntimeClassId classCPose3DPDFGaussianInf
static const
mrpt::utils::TRuntimeClassId
classinfo
static const
mrpt::utils::TRuntimeClassId
_GetBaseClass ()
virtual const
mrpt::utils::TRuntimeClassId
GetRuntimeClass () const
 Returns information about the class of an object in runtime.
virtual mrpt::utils::CObjectduplicate () const
 Returns a copy of the object, indepently of its class.
static mrpt::utils::CObjectCreateObject ()
static CPose3DPDFGaussianInfPtr Create ()

Member Typedef Documentation

A typedef for the associated smart pointer

Definition at line 59 of file CPose3DPDFGaussianInf.h.

The type of the state the PDF represents.

Definition at line 54 of file CProbabilityDensityFunction.h.


Member Enumeration Documentation

anonymous enum [inherited]
Enumerator:
is_3D_val 

Definition at line 85 of file CPose3DPDF.h.

anonymous enum [inherited]
Enumerator:
is_PDF_val 

Definition at line 87 of file CPose3DPDF.h.


Constructor & Destructor Documentation

mrpt::poses::CPose3DPDFGaussianInf::CPose3DPDFGaussianInf ( )

Default constructor - mean: all zeros, inverse covariance=all zeros -> so be careful!

mrpt::poses::CPose3DPDFGaussianInf::CPose3DPDFGaussianInf ( const CPose3D init_Mean) [explicit]

Constructor with a mean value, inverse covariance=all zeros -> so be careful!

mrpt::poses::CPose3DPDFGaussianInf::CPose3DPDFGaussianInf ( TConstructorFlags_Poses  constructor_dummy_param)

Uninitialized constructor: leave all fields uninitialized - Call with UNINITIALIZED_POSE as argument.

mrpt::poses::CPose3DPDFGaussianInf::CPose3DPDFGaussianInf ( const CPose3D init_Mean,
const CMatrixDouble66 init_CovInv 
)

Constructor with mean and inv cov.

mrpt::poses::CPose3DPDFGaussianInf::CPose3DPDFGaussianInf ( const CPose3DQuatPDFGaussian o) [explicit]

Constructor from a 6D pose PDF described as a Quaternion.


Member Function Documentation

static const mrpt::utils::TRuntimeClassId* mrpt::poses::CPose3DPDFGaussianInf::_GetBaseClass ( ) [static, protected]

Reimplemented from mrpt::poses::CPose3DPDF.

void mrpt::poses::CPose3DPDFGaussianInf::assureSymmetry ( ) [protected]

Assures the symmetry of the covariance matrix (eventually certain operations in the math-coprocessor lead to non-symmetric matrixes!)

void mrpt::poses::CPose3DPDFGaussianInf::bayesianFusion ( const CPose3DPDF p1,
const CPose3DPDF p2 
) [virtual]

Bayesian fusion of two points gauss.

distributions, then save the result in this object. The process is as follows:

  • (x1,S1): Mean and variance of the p1 distribution.
  • (x2,S2): Mean and variance of the p2 distribution.
  • (x,S): Mean and variance of the resulting distribution.

S = (S1-1 + S2-1)-1; x = S * ( S1-1*x1 + S2-1*x2 );

Implements mrpt::poses::CPose3DPDF.

void mrpt::poses::CPose3DPDFGaussianInf::changeCoordinatesReference ( const CPose3D newReferenceBase) [virtual]

This can be used to convert a PDF from local coordinates to global, providing the point (newReferenceBase) from which "to project" the current pdf.

Result PDF substituted the currently stored one in the object.

Implements mrpt::utils::CProbabilityDensityFunction< CPose3D, 6 >.

CObject* mrpt::utils::CObject::clone ( ) const [inline, inherited]

Cloning interface for smart pointers.

Reimplemented in mrpt::opengl::CRenderizable, and mrpt::opengl::CRenderizableDisplayList.

Definition at line 154 of file CObject.h.

void mrpt::poses::CPose3DPDFGaussianInf::copyFrom ( const CPose3DPDF o) [virtual]

Copy operator, translating if necesary (for example, between particles and gaussian representations)

Implements mrpt::poses::CPose3DPDF.

Referenced by mrpt::graphs::detail::graph_ops::write_EDGE_line().

void mrpt::poses::CPose3DPDFGaussianInf::copyFrom ( const CPosePDF o)

Copy operator, translating if necesary (for example, between particles and gaussian representations)

void mrpt::poses::CPose3DPDFGaussianInf::copyFrom ( const CPose3DQuatPDFGaussian o)

Copy from a 6D pose PDF described as a Quaternion.

static CPose3DPDFGaussianInfPtr mrpt::poses::CPose3DPDFGaussianInf::Create ( ) [static]
static CPose3DPDF* mrpt::poses::CPose3DPDF::createFrom2D ( const CPosePDF o) [static, inherited]

This is a static transformation method from 2D poses to 3D PDFs, preserving the representation type (particles->particles, Gaussians->Gaussians,etc) It returns a new object of any of the derived classes of CPose3DPDF.

This object must be deleted by the user when not required anymore.

See also:
copyFrom
static mrpt::utils::CObject* mrpt::poses::CPose3DPDFGaussianInf::CreateObject ( ) [static]
void mrpt::poses::CPose3DPDFGaussianInf::drawManySamples ( size_t  N,
std::vector< vector_double > &  outSamples 
) const [virtual]

Draws a number of samples from the distribution, and saves as a list of 1x6 vectors, where each row contains a (x,y,phi) datum.

Reimplemented from mrpt::utils::CProbabilityDensityFunction< CPose3D, 6 >.

virtual void mrpt::utils::CProbabilityDensityFunction::drawSingleSample ( TDATA &  outPart) const [pure virtual, inherited]

Draws a single sample from the distribution.

void mrpt::poses::CPose3DPDFGaussianInf::drawSingleSample ( CPose3D outPart) const

Draws a single sample from the distribution.

virtual mrpt::utils::CObject* mrpt::poses::CPose3DPDFGaussianInf::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 [inline, inherited]

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.

double mrpt::poses::CPose3DPDFGaussianInf::evaluateNormalizedPDF ( const CPose3D x) const

Evaluates the ratio PDF(x) / PDF(MEAN), that is, the normalized PDF in the range [0,1].

double mrpt::poses::CPose3DPDFGaussianInf::evaluatePDF ( const CPose3D x) const

Evaluates the PDF at a given point.

template<class OPENGL_SETOFOBJECTSPTR >
void mrpt::poses::CPose3DPDF::getAs3DObject ( OPENGL_SETOFOBJECTSPTR &  out_obj) const [inline, inherited]

Returns a 3D representation of this PDF.

Note:
Needs the mrpt-opengl library, and using mrpt::opengl::CSetOfObjectsPtr as template argument.

Definition at line 94 of file CPose3DPDF.h.

References mrpt::opengl::posePDF2opengl().

template<class OPENGL_SETOFOBJECTSPTR >
OPENGL_SETOFOBJECTSPTR mrpt::poses::CPose3DPDF::getAs3DObject ( ) const [inline, inherited]

Returns a 3D representation of this PDF.

Note:
Needs the mrpt-opengl library, and using mrpt::opengl::CSetOfObjectsPtr as template argument.

Definition at line 103 of file CPose3DPDF.h.

References mrpt::opengl::posePDF2opengl().

void mrpt::utils::CProbabilityDensityFunction::getCovariance ( CMatrixDouble cov) const [inline, inherited]

Returns the estimate of the covariance matrix (STATE_LEN x STATE_LEN covariance matrix)

See also:
getMean, getCovarianceAndMean

Definition at line 89 of file CProbabilityDensityFunction.h.

void mrpt::utils::CProbabilityDensityFunction::getCovariance ( CMatrixFixedNumeric< double, STATE_LEN, STATE_LEN > &  cov) const [inline, inherited]

Returns the estimate of the covariance matrix (STATE_LEN x STATE_LEN covariance matrix)

See also:
getMean, getCovarianceAndMean

Definition at line 98 of file CProbabilityDensityFunction.h.

CMatrixFixedNumeric<double,STATE_LEN,STATE_LEN> mrpt::utils::CProbabilityDensityFunction::getCovariance ( ) const [inline, inherited]

Returns the estimate of the covariance matrix (STATE_LEN x STATE_LEN covariance matrix)

See also:
getMean

Definition at line 107 of file CProbabilityDensityFunction.h.

virtual void mrpt::utils::CProbabilityDensityFunction::getCovarianceAndMean ( CMatrixFixedNumeric< double, STATE_LEN, STATE_LEN > &  cov,
TDATA &  mean_point 
) const [pure virtual, inherited]

Returns an estimate of the pose covariance matrix (STATE_LENxSTATE_LEN cov matrix) and the mean, both at once.

See also:
getMean
void mrpt::poses::CPose3DPDFGaussianInf::getCovarianceAndMean ( CMatrixDouble66 cov,
CPose3D mean_point 
) const

Returns an estimate of the pose covariance matrix (6x6 cov matrix) and the mean, both at once.

See also:
getMean
void mrpt::utils::CProbabilityDensityFunction::getCovarianceDynAndMean ( CMatrixDouble cov,
TDATA &  mean_point 
) const [inline, inherited]

Returns an estimate of the pose covariance matrix (STATE_LENxSTATE_LEN cov matrix) and the mean, both at once.

See also:
getMean

Definition at line 69 of file CProbabilityDensityFunction.h.

double mrpt::utils::CProbabilityDensityFunction::getCovarianceEntropy ( ) const [inline, inherited]

Compute the entropy of the estimated covariance matrix.

See also:
http://en.wikipedia.org/wiki/Multivariate_normal_distribution#Entropy

Definition at line 145 of file CProbabilityDensityFunction.h.

void mrpt::poses::CPose3DPDFGaussianInf::getInvCovSubmatrix2D ( CMatrixDouble out_cov) const

Returns a 3x3 matrix with submatrix of the inverse covariance for the variables (x,y,yaw) only.

virtual void mrpt::utils::CProbabilityDensityFunction::getMean ( TDATA &  mean_point) const [pure virtual, inherited]

Returns the mean, or mathematical expectation of the probability density distribution (PDF).

See also:
getCovarianceAndMean
void mrpt::poses::CPose3DPDFGaussianInf::getMean ( CPose3D mean_pose) const

Returns an estimate of the pose, (the mean, or mathematical expectation of the PDF).

See also:
getCovariance
TDATA mrpt::utils::CProbabilityDensityFunction::getMeanVal ( ) const [inline, inherited]

Returns the mean, or mathematical expectation of the probability density distribution (PDF).

See also:
getCovariance

Definition at line 79 of file CProbabilityDensityFunction.h.

const CPose3D& mrpt::poses::CPose3DPDFGaussianInf::getPoseMean ( ) const [inline]

Definition at line 75 of file CPose3DPDFGaussianInf.h.

References mean().

CPose3D& mrpt::poses::CPose3DPDFGaussianInf::getPoseMean ( ) [inline]

Definition at line 76 of file CPose3DPDFGaussianInf.h.

References mean().

virtual const mrpt::utils::TRuntimeClassId* mrpt::poses::CPose3DPDFGaussianInf::GetRuntimeClass ( ) const [virtual]

Returns information about the class of an object in runtime.

Reimplemented from mrpt::poses::CPose3DPDF.

void mrpt::poses::CPose3DPDFGaussianInf::inverse ( CPose3DPDF o) const [virtual]

Returns a new PDF such as: NEW_PDF = (0,0,0) - THIS_PDF.

Implements mrpt::poses::CPose3DPDF.

static bool mrpt::poses::CPose3DPDF::is_3D ( ) [inline, static, inherited]

Definition at line 86 of file CPose3DPDF.h.

static bool mrpt::poses::CPose3DPDF::is_PDF ( ) [inline, static, inherited]

Definition at line 88 of file CPose3DPDF.h.

static void mrpt::poses::CPose3DPDFGaussianInf::jacobiansPoseComposition ( const CPose3D x,
const CPose3D u,
CMatrixDouble66 df_dx,
CMatrixDouble66 df_du 
) [static]

This static method computes the pose composition Jacobians, with these formulas:

                                df_dx =
                                [ 1, 0, 0, -sin(yaw)*cos(p)*xu+(-sin(yaw)*sin(p)*sin(r)-cos(yaw)*cos(r))*yu+(-sin(yaw)*sin(p)*cos(r)+cos(yaw)*sin(r))*zu, -cos(yaw)*sin(p)*xu+cos(yaw)*cos(p)*sin(r)*yu+cos(yaw)*cos(p)*cos(r)*zu, (cos(yaw)*sin(p)*cos(r)+sin(yaw)*sin(r))*yu+(-cos(yaw)*sin(p)*sin(r)+sin(yaw)*cos(r))*zu]
                                [ 0, 1, 0,    cos(yaw)*cos(p)*xu+(cos(yaw)*sin(p)*sin(r)-sin(yaw)*cos(r))*yu+(cos(yaw)*sin(p)*cos(r)+sin(yaw)*sin(r))*zu, -sin(yaw)*sin(p)*xu+sin(yaw)*cos(p)*sin(r)*yu+sin(yaw)*cos(p)*cos(r)*zu, (sin(yaw)*sin(p)*cos(r)-cos(yaw)*sin(r))*yu+(-sin(yaw)*sin(p)*sin(r)-cos(yaw)*cos(r))*zu]
                                [ 0, 0, 1,                                                                                                             0, -cos(p)*xu-sin(p)*sin(r)*yu-sin(p)*cos(r)*zu,                            cos(p)*cos(r)*yu-cos(p)*sin(r)*zu]
                                [ 0, 0, 0, 1, 0, 0]
                                [ 0, 0, 0, 0, 1, 0]
                                [ 0, 0, 0, 0, 0, 1]

                                df_du =
                                [ cos(yaw)*cos(p), cos(yaw)*sin(p)*sin(r)-sin(yaw)*cos(r), cos(yaw)*sin(p)*cos(r)+sin(yaw)*sin(r), 0, 0, 0]
                                [ sin(yaw)*cos(p), sin(yaw)*sin(p)*sin(r)+cos(yaw)*cos(r), sin(yaw)*sin(p)*cos(r)-cos(yaw)*sin(r), 0, 0, 0]
                                [ -sin(p),         cos(p)*sin(r),                          cos(p)*cos(r),                          0, 0, 0]
                                [ 0, 0, 0, 1, 0, 0]
                                [ 0, 0, 0, 0, 1, 0]
                                [ 0, 0, 0, 0, 0, 1]
double mrpt::poses::CPose3DPDFGaussianInf::mahalanobisDistanceTo ( const CPose3DPDFGaussianInf theOther)

Computes the Mahalanobis distance between the centers of two Gaussians.

The variables with a variance exactly equal to 0 are not taken into account in the process, but "infinity" is returned if the corresponding elements are not exactly equal.

void mrpt::poses::CPose3DPDFGaussianInf::operator+= ( const CPose3D Ap)

Makes: thisPDF = thisPDF + Ap, where "+" is pose composition (both the mean, and the covariance matrix are updated).

void mrpt::poses::CPose3DPDFGaussianInf::operator+= ( const CPose3DPDFGaussianInf Ap)

Makes: thisPDF = thisPDF + Ap, where "+" is pose composition (both the mean, and the covariance matrix are updated).

CPose3DPDFGaussianInf mrpt::poses::CPose3DPDFGaussianInf::operator- ( ) const [inline]

Unary - operator, returns the PDF of the inverse pose.

Definition at line 151 of file CPose3DPDFGaussianInf.h.

References mrpt::poses::UNINITIALIZED_POSE.

void mrpt::poses::CPose3DPDFGaussianInf::operator-= ( const CPose3DPDFGaussianInf Ap)

Makes: thisPDF = thisPDF - Ap, where "-" is pose inverse composition (both the mean, and the covariance matrix are updated).

virtual void mrpt::utils::CSerializable::readFromStream ( mrpt::utils::CStream in,
int  version 
) [protected, pure virtual, inherited]

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

Implemented in mrpt::math::CMatrixD, and mrpt::math::CMatrix.

void mrpt::poses::CPose3DPDFGaussianInf::saveToTextFile ( const std::string file) const [virtual]

Save the PDF to a text file, containing the 3D pose in the first line, then the covariance matrix in next 3 lines.

Implements mrpt::utils::CProbabilityDensityFunction< CPose3D, 6 >.

virtual void mrpt::utils::CSerializable::writeToStream ( mrpt::utils::CStream out,
int *  getVersion 
) const [protected, pure virtual, inherited]

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

Implemented in mrpt::math::CMatrixD, and mrpt::math::CMatrix.


Friends And Related Function Documentation

friend class mrpt::utils::CStream [friend, inherited]

Reimplemented from mrpt::utils::CSerializable.

Definition at line 63 of file CPose3DPDF.h.


Member Data Documentation

Definition at line 59 of file CPose3DPDFGaussianInf.h.

Definition at line 139 of file CObject.h.

Definition at line 63 of file CPose3DPDF.h.

Definition at line 59 of file CPose3DPDFGaussianInf.h.

Definition at line 56 of file CSerializable.h.

Definition at line 59 of file CPose3DPDFGaussianInf.h.

The inverse of the 6x6 covariance matrix.

Definition at line 71 of file CPose3DPDFGaussianInf.h.

Referenced by mrpt::graphs::detail::graph_ops::write_EDGE_line(), and mrpt::graphs::detail::graph_ops::auxMaha2Dist().

The length of the variable, for example, 3 for a 3D point, 6 for a 3D pose (x y z yaw pitch roll).

Definition at line 53 of file CProbabilityDensityFunction.h.




Page generated by Doxygen 1.7.5 for MRPT 0.9.5 SVN: at Thu Oct 13 21:25:36 UTC 2011