10 #define CPointPDFSOG_H 109 void resize(
const size_t N);
178 const double& minMahalanobisDistToDrop = 0)
override;
184 float x_min,
float x_max,
float y_min,
float y_max,
float resolutionXY,
This class is a "CSerializable" wrapper for "CMatrixTemplateNumeric<double>".
void getMean(CPoint3D &mean_point) const override
Returns an estimate of the point, (the mean, or mathematical expectation of the PDF) ...
std::deque< TGaussianMode > CListGaussianModes
void resize(const size_t N)
Resize the number of SOG modes.
Declares a class that represents a Probability Density function (PDF) of a 3D point ...
The struct for each mode:
const TGaussianMode & operator[](size_t i) const
Access to individual beacons.
void clear()
Clear all the gaussian modes.
void drawSingleSample(CPoint3D &outSample) const override
Draw a sample from the pdf.
const Scalar * const_iterator
bool empty() const
Return whether there is any Gaussian mode.
void push_back(const TGaussianMode &m)
Inserts a copy of the given mode into the SOG.
TGaussianMode & operator[](size_t i)
Access to individual beacons.
std::deque< TGaussianMode >::const_iterator const_iterator
void normalizeWeights()
Normalize the weights in m_modes such as the maximum log-weight is 0.
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...
GLsizei const GLchar ** string
A class used to store a 3D point.
iterator erase(iterator i)
void 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 changeCoordinatesReference(const CPose3D &newReferenceBase) override
this = p (+) this.
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...
void copyFrom(const CPointPDF &o) override
Copy operator, translating if necesary (for example, between particles and gaussian representations) ...
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
double ESS() const
Computes the "Effective sample size" (typical measure for Particle Filters), applied to the weights o...
size_t size() const
Return the number of Gaussian modes.
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!)
const_iterator begin() const
const_iterator end() const
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...
CPointPDFSOG(size_t nModes=1)
Default constructor.
double log_w
The log-weight.
void getMostLikelyMode(CPointPDFGaussian &outVal) const
Return the Gaussian mode with the highest likelihood (or an empty Gaussian if there are no modes in t...
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...
std::deque< TGaussianMode >::iterator iterator
Declares a class that represents a Probability Distribution function (PDF) of a 3D point (x...
double evaluatePDF(const CPoint3D &x, bool sumOverAllZs) const
Evaluates the PDF at a given point.
CListGaussianModes m_modes
The list of SOG modes.
A gaussian distribution for 3D points.
void assureSymmetry()
Assures the symmetry of the covariance matrix (eventually certain operations in the math-coprocessor ...