A probability distribution of a 2D/3D point, represented as a set of random samples (particles).
Definition at line 69 of file CPointPDFParticles.h.
#include <mrpt/poses/CPointPDFParticles.h>
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::CObject * | duplicate () const |
Returns a copy of the object, indepently of its class. | |
static mrpt::utils::CObject * | CreateObject () |
static CPointPDFParticlesPtr | Create () |
A typedef for the associated smart pointer
Definition at line 72 of file CPointPDFParticles.h.
mrpt::poses::CPointPDFParticles::CPointPDFParticles | ( | size_t | numParticles = 1 ) |
Default constructor.
virtual mrpt::poses::CPointPDFParticles::~CPointPDFParticles | ( | ) | [virtual] |
Destructor.
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!)
p1 | The first distribution to fuse |
p2 | The second distribution to fuse |
minMahalanobisDistToDrop | If 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.
void mrpt::poses::CPointPDFParticles::getMean | ( | CPoint3D & | mean_point ) | const [virtual] |
Returns an estimate of the point, (the mean, or mathematical expectation of the PDF).
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.
mrpt::utils::CLASSINIT mrpt::poses::CPointPDFParticles::_init_CPointPDFParticles [static, protected] |
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.2 for MRPT 0.9.4 SVN: at Mon Jan 10 22:30:30 UTC 2011 |