10 #define CPointPDFSOG_H
107 void resize(
const size_t N);
176 const double minMahalanobisDistToDrop = 0)
override;
182 float x_min,
float x_max,
float y_min,
float y_max,
float resolutionXY,
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
This class is a "CSerializable" wrapper for "CMatrixTemplateNumeric<double>".
A class used to store a 3D point.
A gaussian distribution for 3D points.
Declares a class that represents a Probability Distribution function (PDF) of a 3D point (x,...
Declares a class that represents a Probability Density function (PDF) of a 3D point .
void copyFrom(const CPointPDF &o) override
Copy operator, translating if necesary (for example, between particles and gaussian representations)
iterator erase(iterator i)
size_t size() const
Return the number of Gaussian modes.
std::deque< TGaussianMode >::iterator iterator
std::deque< TGaussianMode > CListGaussianModes
std::deque< TGaussianMode >::const_iterator const_iterator
void evaluatePDFInArea(float x_min, float x_max, float y_min, float y_max, float resolutionXY, float z, mrpt::math::CMatrixD &outMatrix, bool sumOverAllZs=false)
Evaluates the PDF within a rectangular grid and saves the result in a matrix (each row contains value...
const_iterator begin() const
const TGaussianMode & operator[](size_t i) const
Access to individual beacons.
CListGaussianModes m_modes
The list of SOG modes.
void changeCoordinatesReference(const CPose3D &newReferenceBase) override
this = p (+) this.
void getMean(CPoint3D &mean_point) const override
Returns an estimate of the point, (the mean, or mathematical expectation of the PDF)
CPointPDFSOG(size_t nModes=1)
Default constructor.
bool saveToTextFile(const std::string &file) const override
Save the density to a text file, with the following format: There is one row per Gaussian "mode",...
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.
void push_back(const TGaussianMode &m)
Inserts a copy of the given mode into the SOG.
void drawSingleSample(CPoint3D &outSample) const override
Draw a sample from the pdf.
const TGaussianMode & get(size_t i) const
Access to individual beacons.
double ESS() const
Computes the "Effective sample size" (typical measure for Particle Filters), applied to the weights o...
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),...
bool empty() const
Return whether there is any Gaussian mode.
void normalizeWeights()
Normalize the weights in m_modes such as the maximum log-weight is 0.
double evaluatePDF(const CPoint3D &x, bool sumOverAllZs) const
Evaluates the PDF at a given point.
void resize(const size_t N)
Resize the number of SOG modes.
void getMostLikelyMode(CPointPDFGaussian &outVal) const
Return the Gaussian mode with the highest likelihood (or an empty Gaussian if there are no modes in t...
TGaussianMode & operator[](size_t i)
Access to individual beacons.
const_iterator end() const
void assureSymmetry()
Assures the symmetry of the covariance matrix (eventually certain operations in the math-coprocessor ...
TGaussianMode & get(size_t i)
Access to individual beacons.
void clear()
Clear all the gaussian modes.
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
const Scalar * const_iterator
#define ASSERT_(f)
Defines an assertion mechanism.
GLsizei const GLchar ** string
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,...
Classes for 2D/3D geometry representation, both of single values and probability density distribution...
The struct for each mode:
double log_w
The log-weight.