Declares a class that represents a Probability Density function (PDF) of a 3D point .
This class implements that PDF as the following multi-modal Gaussian distribution:
Where the number of modes N is the size of CPointPDFSOG::m_modes
See mrpt::poses::CPointPDF for more details.
Definition at line 53 of file CPointPDFSOG.h.
#include <mrpt/poses/CPointPDFSOG.h>
Classes | |
struct | TGaussianMode |
The struct for each mode: More... | |
Public Types | |
typedef std::deque< TGaussianMode > | CListGaussianModes |
typedef std::deque < TGaussianMode > ::const_iterator | const_iterator |
typedef std::deque < TGaussianMode >::iterator | iterator |
Public Member Functions | |
CPointPDFSOG (size_t nModes=1) | |
Default constructor. | |
void | clear () |
Clear all the gaussian modes. | |
const TGaussianMode & | operator[] (size_t i) const |
Access to individual beacons. | |
TGaussianMode & | operator[] (size_t i) |
Access to individual beacons. | |
const TGaussianMode & | get (size_t i) const |
Access to individual beacons. | |
TGaussianMode & | get (size_t i) |
Access to individual beacons. | |
void | push_back (const TGaussianMode &m) |
Inserts a copy of the given mode into the SOG. | |
iterator | begin () |
iterator | end () |
const_iterator | begin () const |
const_iterator | end () const |
iterator | erase (iterator i) |
void | resize (const size_t N) |
Resize the number of SOG modes. | |
size_t | size () const |
Return the number of Gaussian modes. | |
bool | empty () const |
Return whether there is any Gaussian mode. | |
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 | normalizeWeights () |
Normalize the weights in m_modes such as the maximum log-weight is 0. | |
void | getMostLikelyMode (CPointPDFGaussian &outVal) const |
Return the Gaussian mode with the highest likelihood (or an empty Gaussian if there are no modes in this SOG) | |
double | ESS () const |
Computes the "Effective sample size" (typical measure for Particle Filters), applied to the weights of the individual Gaussian modes, as a measure of the equality of the modes (in the range [0,total # of modes]). | |
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 the density to a text file, with the following format: There is one row per Gaussian "mode", and each row contains 10 elements:
| |
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 (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!) | |
void | evaluatePDFInArea (float x_min, float x_max, float y_min, float y_max, float resolutionXY, float z, CMatrixD &outMatrix, bool sumOverAllZs=false) |
Evaluates the PDF within a rectangular grid and saves the result in a matrix (each row contains values for a fixed y-coordinate value). | |
double | evaluatePDF (const CPoint3D &x, bool sumOverAllZs) const |
Evaluates the PDF at a given point. | |
Protected Member Functions | |
void | assureSymmetry () |
Assures the symmetry of the covariance matrix (eventually certain operations in the math-coprocessor lead to non-symmetric matrixes!) | |
Protected Attributes | |
CListGaussianModes | m_modes |
The list of SOG modes. | |
RTTI stuff | |
typedef CPointPDFSOGPtr | SmartPtr |
static mrpt::utils::CLASSINIT | _init_CPointPDFSOG |
static mrpt::utils::TRuntimeClassId | classCPointPDFSOG |
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 CPointPDFSOGPtr | Create () |
typedef std::deque<TGaussianMode> mrpt::poses::CPointPDFSOG::CListGaussianModes |
Definition at line 74 of file CPointPDFSOG.h.
typedef std::deque<TGaussianMode>::const_iterator mrpt::poses::CPointPDFSOG::const_iterator |
Definition at line 75 of file CPointPDFSOG.h.
typedef std::deque<TGaussianMode>::iterator mrpt::poses::CPointPDFSOG::iterator |
Definition at line 76 of file CPointPDFSOG.h.
A typedef for the associated smart pointer
Definition at line 56 of file CPointPDFSOG.h.
mrpt::poses::CPointPDFSOG::CPointPDFSOG | ( | size_t | nModes = 1 | ) |
Default constructor.
nModes | The initial size of CPointPDFSOG::m_modes |
static const mrpt::utils::TRuntimeClassId* mrpt::poses::CPointPDFSOG::_GetBaseClass | ( | ) | [static, protected] |
Reimplemented from mrpt::poses::CPointPDF.
void mrpt::poses::CPointPDFSOG::assureSymmetry | ( | ) | [protected] |
Assures the symmetry of the covariance matrix (eventually certain operations in the math-coprocessor lead to non-symmetric matrixes!)
void mrpt::poses::CPointPDFSOG::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.
iterator mrpt::poses::CPointPDFSOG::begin | ( | ) | [inline] |
Definition at line 121 of file CPointPDFSOG.h.
const_iterator mrpt::poses::CPointPDFSOG::begin | ( | ) | const [inline] |
Definition at line 123 of file CPointPDFSOG.h.
void mrpt::poses::CPointPDFSOG::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< CPoint3D, 3 >.
void mrpt::poses::CPointPDFSOG::clear | ( | ) |
Clear all the gaussian modes.
void mrpt::poses::CPointPDFSOG::copyFrom | ( | const CPointPDF & | o | ) | [virtual] |
Copy operator, translating if necesary (for example, between particles and gaussian representations)
Implements mrpt::poses::CPointPDF.
static CPointPDFSOGPtr mrpt::poses::CPointPDFSOG::Create | ( | ) | [static] |
static mrpt::utils::CObject* mrpt::poses::CPointPDFSOG::CreateObject | ( | ) | [static] |
void mrpt::poses::CPointPDFSOG::drawSingleSample | ( | CPoint3D & | outSample | ) | const [virtual] |
Draw a sample from the pdf.
Implements mrpt::utils::CProbabilityDensityFunction< CPoint3D, 3 >.
virtual mrpt::utils::CObject* mrpt::poses::CPointPDFSOG::duplicate | ( | ) | const [virtual] |
Returns a copy of the object, indepently of its class.
Implements mrpt::utils::CObject.
bool mrpt::poses::CPointPDFSOG::empty | ( | ) | const [inline] |
Return whether there is any Gaussian mode.
Definition at line 130 of file CPointPDFSOG.h.
const_iterator mrpt::poses::CPointPDFSOG::end | ( | ) | const [inline] |
Definition at line 124 of file CPointPDFSOG.h.
iterator mrpt::poses::CPointPDFSOG::end | ( | ) | [inline] |
Definition at line 122 of file CPointPDFSOG.h.
Definition at line 126 of file CPointPDFSOG.h.
double mrpt::poses::CPointPDFSOG::ESS | ( | ) | const |
Computes the "Effective sample size" (typical measure for Particle Filters), applied to the weights of the individual Gaussian modes, as a measure of the equality of the modes (in the range [0,total # of modes]).
double mrpt::poses::CPointPDFSOG::evaluatePDF | ( | const CPoint3D & | x, |
bool | sumOverAllZs | ||
) | const |
Evaluates the PDF at a given point.
void mrpt::poses::CPointPDFSOG::evaluatePDFInArea | ( | float | x_min, |
float | x_max, | ||
float | y_min, | ||
float | y_max, | ||
float | resolutionXY, | ||
float | z, | ||
CMatrixD & | outMatrix, | ||
bool | sumOverAllZs = false |
||
) |
Evaluates the PDF within a rectangular grid and saves the result in a matrix (each row contains values for a fixed y-coordinate value).
const TGaussianMode& mrpt::poses::CPointPDFSOG::get | ( | size_t | i | ) | const [inline] |
TGaussianMode& mrpt::poses::CPointPDFSOG::get | ( | size_t | i | ) | [inline] |
void mrpt::poses::CPointPDFSOG::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::CPointPDFSOG::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 >.
void mrpt::poses::CPointPDFSOG::getMostLikelyMode | ( | CPointPDFGaussian & | outVal | ) | const |
Return the Gaussian mode with the highest likelihood (or an empty Gaussian if there are no modes in this SOG)
virtual const mrpt::utils::TRuntimeClassId* mrpt::poses::CPointPDFSOG::GetRuntimeClass | ( | ) | const [virtual] |
Returns information about the class of an object in runtime.
Reimplemented from mrpt::poses::CPointPDF.
void mrpt::poses::CPointPDFSOG::normalizeWeights | ( | ) |
Normalize the weights in m_modes such as the maximum log-weight is 0.
TGaussianMode& mrpt::poses::CPointPDFSOG::operator[] | ( | size_t | i | ) | [inline] |
const TGaussianMode& mrpt::poses::CPointPDFSOG::operator[] | ( | size_t | i | ) | const [inline] |
void mrpt::poses::CPointPDFSOG::push_back | ( | const TGaussianMode & | m | ) | [inline] |
Inserts a copy of the given mode into the SOG.
Definition at line 117 of file CPointPDFSOG.h.
void mrpt::poses::CPointPDFSOG::resize | ( | const size_t | N | ) |
Resize the number of SOG modes.
void mrpt::poses::CPointPDFSOG::saveToTextFile | ( | const std::string & | file | ) | const [virtual] |
Save the density to a text file, with the following format: There is one row per Gaussian "mode", and each row contains 10 elements:
Implements mrpt::utils::CProbabilityDensityFunction< CPoint3D, 3 >.
size_t mrpt::poses::CPointPDFSOG::size | ( | ) | const [inline] |
Return the number of Gaussian modes.
Definition at line 129 of file CPointPDFSOG.h.
mrpt::utils::CLASSINIT mrpt::poses::CPointPDFSOG::_init_CPointPDFSOG [static, protected] |
Definition at line 56 of file CPointPDFSOG.h.
Definition at line 56 of file CPointPDFSOG.h.
const mrpt::utils::TRuntimeClassId* mrpt::poses::CPointPDFSOG::classinfo [static] |
Definition at line 56 of file CPointPDFSOG.h.
CListGaussianModes mrpt::poses::CPointPDFSOG::m_modes [protected] |
The list of SOG modes.
Definition at line 84 of file CPointPDFSOG.h.
Page generated by Doxygen 1.7.3 for MRPT 0.9.4 SVN:exported at Tue Jan 25 21:56:31 UTC 2011 |