MRPT
1.9.9
|
A generic template for probability density distributions (PDFs).
This template is used as base for many classes in mrpt::poses Any derived class must implement getMean() and a getCovarianceAndMean(). Other methods such as getMean() or getCovariance() are implemented here for convenience.
Definition at line 26 of file CProbabilityDensityFunction.h.
#include <mrpt/math/CProbabilityDensityFunction.h>
Public Types | |
using | type_value = TDATA |
The type of the state the PDF represents. More... | |
using | self_t = CProbabilityDensityFunction< TDATA, STATE_LEN > |
Public Member Functions | |
virtual void | getMean (TDATA &mean_point) const =0 |
Returns the mean, or mathematical expectation of the probability density distribution (PDF). More... | |
virtual void | getCovarianceAndMean (mrpt::math::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. More... | |
void | getCovarianceDynAndMean (mrpt::math::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. More... | |
TDATA | getMeanVal () const |
Returns the mean, or mathematical expectation of the probability density distribution (PDF). More... | |
void | getCovariance (mrpt::math::CMatrixDouble &cov) const |
Returns the estimate of the covariance matrix (STATE_LEN x STATE_LEN covariance matrix) More... | |
void | getCovariance (mrpt::math::CMatrixFixedNumeric< double, STATE_LEN, STATE_LEN > &cov) const |
Returns the estimate of the covariance matrix (STATE_LEN x STATE_LEN covariance matrix) More... | |
mrpt::math::CMatrixFixedNumeric< double, STATE_LEN, STATE_LEN > | getCovariance () const |
Returns the estimate of the covariance matrix (STATE_LEN x STATE_LEN covariance matrix) More... | |
virtual bool | isInfType () const |
Returns whether the class instance holds the uncertainty in covariance or information form. More... | |
virtual void | getInformationMatrix (mrpt::math::CMatrixFixedNumeric< double, STATE_LEN, STATE_LEN > &inf) const |
Returns the information (inverse covariance) matrix (a STATE_LEN x STATE_LEN matrix) Unless reimplemented in derived classes, this method first reads the covariance, then invert it. More... | |
virtual bool | saveToTextFile (const std::string &file) const =0 |
Save PDF's particles to a text file. More... | |
virtual void | drawSingleSample (TDATA &outPart) const =0 |
Draws a single sample from the distribution. More... | |
virtual void | drawManySamples (size_t N, std::vector< mrpt::math::CVectorDouble > &outSamples) const |
Draws a number of samples from the distribution, and saves as a list of 1xSTATE_LEN vectors, where each row contains a (x,y,z,yaw,pitch,roll) datum. More... | |
double | getCovarianceEntropy () const |
Compute the entropy of the estimated covariance matrix. More... | |
Static Public Attributes | |
static constexpr size_t | state_length = STATE_LEN |
The length of the variable, for example, 3 for a 3D point, 6 for a 3D pose (x y z yaw pitch roll). More... | |
using mrpt::math::CProbabilityDensityFunction< TDATA, STATE_LEN >::self_t = CProbabilityDensityFunction<TDATA, STATE_LEN> |
Definition at line 34 of file CProbabilityDensityFunction.h.
using mrpt::math::CProbabilityDensityFunction< TDATA, STATE_LEN >::type_value = TDATA |
The type of the state the PDF represents.
Definition at line 33 of file CProbabilityDensityFunction.h.
|
inlinevirtual |
Draws a number of samples from the distribution, and saves as a list of 1xSTATE_LEN vectors, where each row contains a (x,y,z,yaw,pitch,roll) datum.
This base method just call N times to drawSingleSample, but derived classes should implemented optimized method for each particular PDF.
Reimplemented in mrpt::poses::CPosePDFSOG, mrpt::poses::CPosePDFGaussianInf, mrpt::poses::CPose3DPDFGaussian, mrpt::poses::CPosePDFGaussian, mrpt::poses::CPose3DPDFSOG, mrpt::poses::CPose3DPDFGaussianInf, mrpt::poses::CPose3DQuatPDFGaussian, mrpt::poses::CPose3DQuatPDFGaussianInf, mrpt::poses::CPose3DPDFParticles, and mrpt::poses::CPosePDFGrid.
Definition at line 152 of file CProbabilityDensityFunction.h.
|
pure virtual |
Draws a single sample from the distribution.
Referenced by mrpt::math::CProbabilityDensityFunction< CPose2D, 3 >::drawManySamples().
|
inline |
Returns the estimate of the covariance matrix (STATE_LEN x STATE_LEN covariance matrix)
Definition at line 78 of file CProbabilityDensityFunction.h.
Referenced by mrpt::poses::CPosePDFGaussian::copyFrom(), mrpt::poses::CPosePDFGaussianInf::copyFrom(), mrpt::poses::CPosePDFSOG::copyFrom(), and mrpt::maps::CMultiMetricMapPDF::prediction_and_update_pfOptimalProposal().
|
inline |
Returns the estimate of the covariance matrix (STATE_LEN x STATE_LEN covariance matrix)
Definition at line 88 of file CProbabilityDensityFunction.h.
|
inline |
Returns the estimate of the covariance matrix (STATE_LEN x STATE_LEN covariance matrix)
Definition at line 101 of file CProbabilityDensityFunction.h.
Referenced by mrpt::math::CProbabilityDensityFunction< CPose2D, 3 >::getCovarianceEntropy().
|
pure virtual |
Returns an estimate of the pose covariance matrix (STATE_LENxSTATE_LEN cov matrix) and the mean, both at once.
Referenced by mrpt::poses::CPoint2DPDFGaussian::copyFrom(), mrpt::poses::CPointPDFGaussian::copyFrom(), mrpt::poses::CPose3DQuatPDFGaussian::copyFrom(), mrpt::poses::CPose3DQuatPDFGaussianInf::copyFrom(), mrpt::poses::CPose3DPDFSOG::copyFrom(), mrpt::poses::CPose3DPDFGaussianInf::copyFrom(), mrpt::poses::CPose3DPDFGaussian::copyFrom(), mrpt::poses::CPointPDFSOG::copyFrom(), mrpt::math::CProbabilityDensityFunction< CPose2D, 3 >::getCovariance(), mrpt::math::CProbabilityDensityFunction< CPose2D, 3 >::getCovarianceDynAndMean(), and mrpt::math::CProbabilityDensityFunction< CPose2D, 3 >::getInformationMatrix().
|
inline |
Returns an estimate of the pose covariance matrix (STATE_LENxSTATE_LEN cov matrix) and the mean, both at once.
Definition at line 54 of file CProbabilityDensityFunction.h.
Referenced by mrpt::math::CProbabilityDensityFunction< CPose2D, 3 >::getCovariance().
|
inline |
Compute the entropy of the estimated covariance matrix.
Definition at line 168 of file CProbabilityDensityFunction.h.
Referenced by mrpt::maps::CMultiMetricMapPDF::getCurrentEntropyOfPaths().
|
inlinevirtual |
Returns the information (inverse covariance) matrix (a STATE_LEN x STATE_LEN matrix) Unless reimplemented in derived classes, this method first reads the covariance, then invert it.
Definition at line 124 of file CProbabilityDensityFunction.h.
|
pure virtual |
Returns the mean, or mathematical expectation of the probability density distribution (PDF).
Referenced by mrpt::poses::CPosePDFGaussian::copyFrom(), mrpt::poses::CPosePDFGaussianInf::copyFrom(), mrpt::poses::CPosePDFSOG::copyFrom(), and mrpt::math::CProbabilityDensityFunction< CPose2D, 3 >::getMeanVal().
|
inline |
Returns the mean, or mathematical expectation of the probability density distribution (PDF).
Definition at line 67 of file CProbabilityDensityFunction.h.
Referenced by mrpt::poses::CPosePDFGaussian::copyFrom(), mrpt::poses::CPosePDFGaussianInf::copyFrom(), mrpt::slam::CMetricMapBuilderICP::initialize(), mrpt::slam::CMetricMapBuilderRBPF::initialize(), and mrpt::slam::CMetricMapBuilderICP::processObservation().
|
inlinevirtual |
Returns whether the class instance holds the uncertainty in covariance or information form.
Reimplemented in mrpt::poses::CPose3DPDFGaussianInf, mrpt::poses::CPosePDFGaussianInf, and mrpt::poses::CPose3DQuatPDFGaussianInf.
Definition at line 117 of file CProbabilityDensityFunction.h.
|
pure virtual |
Save PDF's particles to a text file.
See derived classes for more information about the format of generated files.
Implemented in mrpt::poses::CPosePDFSOG, mrpt::poses::CPointPDFSOG, mrpt::poses::CPose3DPDFGaussian, mrpt::poses::CPose3DPDFGaussianInf, mrpt::poses::CPose3DPDFSOG, mrpt::poses::CPosePDFParticles, mrpt::maps::CBeacon, mrpt::poses::CPosePDFGaussianInf, mrpt::poses::CPose3DQuatPDFGaussian, mrpt::poses::CPose3DQuatPDFGaussianInf, mrpt::poses::CPosePDFGaussian, mrpt::poses::CPose3DPDFParticles, mrpt::poses::CPointPDFParticles, mrpt::poses::CPosePDFGrid, mrpt::poses::CPointPDFGaussian, and mrpt::poses::CPoint2DPDFGaussian.
|
static |
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 31 of file CProbabilityDensityFunction.h.
Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 7d5e6d718 Fri Aug 24 01:51:28 2018 +0200 at lun nov 2 08:35:50 CET 2020 |