9 #ifndef CPointPDFParticles_H
10 #define CPointPDFParticles_H
83 return m_particles.size();
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
#define DEFINE_SERIALIZABLE_POST_CUSTOM_BASE(class_name, base_name)
#define DEFINE_SERIALIZABLE_PRE_CUSTOM_BASE(class_name, base_name)
This declaration must be inserted in all CSerializable classes definition, before the class declarati...
std::deque< CParticleData > CParticleList
Use this type to refer to the list of particles m_particles.
A numeric matrix of compile-time fixed size.
A class used to store a 3D point.
Declares a class that represents a Probability Distribution function (PDF) of a 3D point (x,...
A probability distribution of a 2D/3D point, represented as a set of random samples (particles).
void clear()
Clear all the particles (free memory)
virtual ~CPointPDFParticles()
Destructor.
double computeKurtosis()
Compute the kurtosis of the distribution.
void changeCoordinatesReference(const CPose3D &newReferenceBase) MRPT_OVERRIDE
this = p (+) this.
void getCovarianceAndMean(mrpt::math::CMatrixDouble33 &cov, CPoint3D &mean_point) const MRPT_OVERRIDE
Returns an estimate of the point covariance matrix (3x3 cov matrix) and the mean, both at once.
void getMean(CPoint3D &mean_point) const MRPT_OVERRIDE
Returns an estimate of the point, (the mean, or mathematical expectation of the PDF)
size_t size() const
Returns the number of particles.
void drawSingleSample(CPoint3D &outSample) const MRPT_OVERRIDE
Draw a sample from the pdf.
void saveToTextFile(const std::string &file) const MRPT_OVERRIDE
Save PDF's particles to a text file, where each line is: X Y Z LOG_W.
CPointPDFParticles(size_t numParticles=1)
Default constructor.
void bayesianFusion(const CPointPDF &p1, const CPointPDF &p2, const double &minMahalanobisDistToDrop=0) MRPT_OVERRIDE
Bayesian fusion of two point distributions (product of two distributions->new distribution),...
void copyFrom(const CPointPDF &o) MRPT_OVERRIDE
Copy operator, translating if necesary (for example, between particles and gaussian representations)
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.
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Data within each particle.
TSimple3DPoint(const CPoint3D &v)
TSimple3DPoint(const TSimple3DPoint &o)
The virtual base class which provides a unified interface for all persistent objects in MRPT.
EIGEN_STRONG_INLINE void setSize(size_t row, size_t col)
Changes the size of matrix, maintaining its previous content as possible and padding with zeros where...
#define MRPT_OVERRIDE
C++11 "override" for virtuals:
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,...
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.