52 using iterator = std::deque<TGaussianMode>::iterator;
106 void resize(
const size_t N);
171 const double minMahalanobisDistToDrop = 0)
override;
177 float x_min,
float x_max,
float y_min,
float y_max,
float resolutionXY,
This class is a "CSerializable" wrapper for "CMatrixDynamic<double>".
void getMean(CPoint3D &mean_point) const override
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.
bool empty() const
Return whether there is any Gaussian mode.
#define ASSERT_(f)
Defines an assertion mechanism.
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.
void normalizeWeights()
Normalize the weights in m_modes such as the maximum log-weight is 0.
std::tuple< cov_mat_t, type_value > getCovarianceAndMean() const override
Returns an estimate of the pose covariance matrix (STATE_LENxSTATE_LEN cov matrix) and the mean...
GLsizei const GLchar ** string
A class used to store a 3D point.
Classes for 2D/3D geometry representation, both of single values and probability density distribution...
iterator erase(iterator i)
void changeCoordinatesReference(const CPose3D &newReferenceBase) override
this = p (+) this.
#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).
std::deque< TGaussianMode >::const_iterator const_iterator
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.
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...
void enforceCovSymmetry()
Assures the symmetry of the covariance matrix (eventually certain operations in the math-coprocessor ...
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.
std::deque< TGaussianMode > CListGaussianModes
CListGaussianModes m_modes
The list of SOG modes.
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"...
A gaussian distribution for 3D points.
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!)
std::deque< TGaussianMode >::iterator iterator