Main MRPT website > C++ reference
MRPT logo
Public Member Functions

mrpt::poses::CPointPDFParticles Class Reference


Detailed Description

A probability distribution of a 2D/3D point, represented as a set of random samples (particles).

See also:
CPointPDF

Definition at line 69 of file CPointPDFParticles.h.

#include <mrpt/poses/CPointPDFParticles.h>

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

List of all members.

Public Member Functions

 IMPLEMENT_PARTICLE_FILTER_CAPABLE (TSimple3DPoint)
 CPointPDFParticles (size_t numParticles=1)
 Default constructor.
virtual ~CPointPDFParticles ()
 Destructor.
void clear ()
 Clear all the particles (free memory)
void setSize (size_t numberParticles, const CPoint3D &defaultValue=CPoint3D(0, 0, 0))
 Erase all the previous particles and change the number of particles, with a given initial value.
size_t size () const
 Returns the number of particles.
void getMean (CPoint3D &mean_point) const
 Returns an estimate of the point, (the mean, or mathematical expectation of the PDF).
void getCovarianceAndMean (CMatrixDouble33 &cov, CPoint3D &mean_point) const
 Returns an estimate of the point covariance matrix (3x3 cov matrix) and the mean, both at once.
void copyFrom (const CPointPDF &o)
 Copy operator, translating if necesary (for example, between particles and gaussian representations)
void saveToTextFile (const std::string &file) const
 Save PDF's particles to a text file, where each line is: X Y Z LOG_W.
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.
double computeKurtosis ()
 Compute the kurtosis of the distribution.
void drawSingleSample (CPoint3D &outSample) const
 Draw a sample from the pdf.
void bayesianFusion (const CPointPDF &p1, const CPointPDF &p2, const double &minMahalanobisDistToDrop=0)
 Bayesian fusion of two point distributions (product of two distributions->new distribution), then save the result in this object (WARNING: See implementing classes to see classes that can and cannot be mixtured!)

RTTI stuff

typedef CPointPDFParticlesPtr SmartPtr
static mrpt::utils::CLASSINIT _init_CPointPDFParticles
static mrpt::utils::TRuntimeClassId classCPointPDFParticles
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 CPointPDFParticlesPtr Create ()

Member Typedef Documentation

A typedef for the associated smart pointer

Definition at line 72 of file CPointPDFParticles.h.


Constructor & Destructor Documentation

mrpt::poses::CPointPDFParticles::CPointPDFParticles ( size_t  numParticles = 1)

Default constructor.

virtual mrpt::poses::CPointPDFParticles::~CPointPDFParticles ( ) [virtual]

Destructor.


Member Function Documentation

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

Reimplemented from mrpt::poses::CPointPDF.

void mrpt::poses::CPointPDFParticles::bayesianFusion ( const CPointPDF p1,
const CPointPDF p2,
const double &  minMahalanobisDistToDrop = 0 
) [virtual]

Bayesian fusion of two point distributions (product of two distributions->new distribution), then save the result in this object (WARNING: See implementing classes to see classes that can and cannot be mixtured!)

Parameters:
p1The first distribution to fuse
p2The second distribution to fuse
minMahalanobisDistToDropIf set to different of 0, the result of very separate Gaussian modes (that will result in negligible components) in SOGs will be dropped to reduce the number of modes in the output.

Implements mrpt::poses::CPointPDF.

void mrpt::poses::CPointPDFParticles::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. Both the mean value and the covariance matrix are updated correctly.

Implements mrpt::utils::CProbabilityDensityFunction< CPoint3D, 3 >.

void mrpt::poses::CPointPDFParticles::clear ( void  ) [inline]

Clear all the particles (free memory)

Definition at line 88 of file CPointPDFParticles.h.

References setSize().

double mrpt::poses::CPointPDFParticles::computeKurtosis ( )

Compute the kurtosis of the distribution.

void mrpt::poses::CPointPDFParticles::copyFrom ( const CPointPDF o) [virtual]

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

Implements mrpt::poses::CPointPDF.

static CPointPDFParticlesPtr mrpt::poses::CPointPDFParticles::Create ( ) [static]
static mrpt::utils::CObject* mrpt::poses::CPointPDFParticles::CreateObject ( ) [static]
void mrpt::poses::CPointPDFParticles::drawSingleSample ( CPoint3D outSample) const [virtual]

Draw a sample from the pdf.

Implements mrpt::utils::CProbabilityDensityFunction< CPoint3D, 3 >.

virtual mrpt::utils::CObject* mrpt::poses::CPointPDFParticles::duplicate ( ) const [virtual]

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

Implements mrpt::utils::CObject.

void mrpt::poses::CPointPDFParticles::getCovarianceAndMean ( CMatrixDouble33 cov,
CPoint3D mean_point 
) const

Returns an estimate of the point covariance matrix (3x3 cov matrix) and the mean, both at once.

See also:
getMean
void mrpt::poses::CPointPDFParticles::getMean ( CPoint3D mean_point) const [virtual]

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

See also:
getCovariance

Implements mrpt::utils::CProbabilityDensityFunction< CPoint3D, 3 >.

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

Returns information about the class of an object in runtime.

Reimplemented from mrpt::poses::CPointPDF.

mrpt::poses::CPointPDFParticles::IMPLEMENT_PARTICLE_FILTER_CAPABLE ( TSimple3DPoint  )
void mrpt::poses::CPointPDFParticles::saveToTextFile ( const std::string &  file) const [virtual]

Save PDF's particles to a text file, where each line is: X Y Z LOG_W.

Implements mrpt::utils::CProbabilityDensityFunction< CPoint3D, 3 >.

void mrpt::poses::CPointPDFParticles::setSize ( size_t  numberParticles,
const CPoint3D defaultValue = CPoint3D(0, 0, 0) 
)

Erase all the previous particles and change the number of particles, with a given initial value.

size_t mrpt::poses::CPointPDFParticles::size ( ) const [inline]

Returns the number of particles.

Definition at line 96 of file CPointPDFParticles.h.


Member Data Documentation

Definition at line 72 of file CPointPDFParticles.h.

Definition at line 72 of file CPointPDFParticles.h.

Definition at line 72 of file CPointPDFParticles.h.




Page generated by Doxygen 1.7.3 for MRPT 0.9.4 SVN: at Sat Mar 26 06:40:17 UTC 2011