9 #ifndef CPointPDFParticles_H 10 #define CPointPDFParticles_H 44 mrpt::bayes::CParticleFilterData<TSimple3DPoint>::CParticleList>
58 size_t numberParticles,
104 const double& minMahalanobisDistToDrop = 0)
override;
void drawSingleSample(CPoint3D &outSample) const override
Draw a sample from the pdf.
size_t size() const
Returns the number of particles.
The virtual base class which provides a unified interface for all persistent objects in MRPT...
TSimple3DPoint(const CPoint3D &v)
CParticleList m_particles
The array of particles.
TSimple3DPoint(const TSimple3DPoint &o)
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...
Data within each particle.
void getMean(CPoint3D &mean_point) const override
Returns an estimate of the point, (the mean, or mathematical expectation of the PDF) ...
void bayesianFusion(const CPointPDF &p1, const CPointPDF &p2, const double &minMahalanobisDistToDrop=0) override
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!)
GLsizei const GLchar ** string
A class used to store a 3D point.
This template class declares the array of particles and its internal data, managing some memory-relat...
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
void copyFrom(const CPointPDF &o) override
Copy operator, translating if necesary (for example, between particles and gaussian representations) ...
void changeCoordinatesReference(const CPose3D &newReferenceBase) override
this = p (+) this.
CPointPDFParticles(size_t numParticles=1)
Default constructor.
void clear()
Clear all the particles (free memory)
Eigen::Matrix< typename MATRIX::Scalar, MATRIX::ColsAtCompileTime, MATRIX::ColsAtCompileTime > cov(const MATRIX &v)
Computes the covariance matrix from a list of samples in an NxM matrix, where each row is a sample...
void getCovarianceAndMean(mrpt::math::CMatrixDouble33 &cov, CPoint3D &mean_point) const override
Returns an estimate of the point covariance matrix (3x3 cov matrix) and the mean, both at once...
Declares a class that represents a Probability Distribution function (PDF) of a 3D point (x...
double computeKurtosis()
Compute the kurtosis of the distribution.
A probability distribution of a 2D/3D point, represented as a set of random samples (particles)...
void saveToTextFile(const std::string &file) const override
Save PDF's particles to a text file, where each line is: X Y Z LOG_W.
A curiously recurring template pattern (CRTP) approach to providing the basic functionality of any CP...