Go to the documentation of this file.
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,
void assureSymmetry()
Assures the symmetry of the covariance matrix (eventually certain operations in the math-coprocessor ...
const_iterator end() const
const Scalar * const_iterator
TGaussianMode & operator[](size_t i)
Access to individual beacons.
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...
void changeCoordinatesReference(const CPose3D &newReferenceBase) override
this = p (+) this.
void normalizeWeights()
Normalize the weights in m_modes such as the maximum log-weight is 0.
void getMean(CPoint3D &mean_point) const override
Returns an estimate of the point, (the mean, or mathematical expectation of the PDF)
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 clear()
Clear all the gaussian modes.
const TGaussianMode & get(size_t i) const
Access to individual beacons.
A gaussian distribution for 3D points.
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",...
bool empty() const
Return whether there is any Gaussian mode.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
TGaussianMode & get(size_t i)
Access to individual beacons.
#define ASSERT_(f)
Defines an assertion mechanism.
double ESS() const
Computes the "Effective sample size" (typical measure for Particle Filters), applied to the weights o...
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 drawSingleSample(CPoint3D &outSample) const override
Draw a sample from the pdf.
double log_w
The log-weight.
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
CPointPDFSOG(size_t nModes=1)
Default constructor.
std::deque< TGaussianMode >::iterator iterator
std::deque< TGaussianMode > CListGaussianModes
void getMostLikelyMode(CPointPDFGaussian &outVal) const
Return the Gaussian mode with the highest likelihood (or an empty Gaussian if there are no modes in t...
CListGaussianModes m_modes
The list of SOG modes.
std::deque< TGaussianMode >::const_iterator const_iterator
Declares a class that represents a Probability Density function (PDF) of a 3D point .
const TGaussianMode & operator[](size_t i) const
Access to individual beacons.
const_iterator begin() const
#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)
iterator erase(iterator i)
This class is a "CSerializable" wrapper for "CMatrixTemplateNumeric<double>".
GLsizei const GLchar ** string
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),...
Declares a class that represents a Probability Distribution function (PDF) of a 3D point (x,...
A class used to store a 3D point.
The struct for each mode:
size_t size() const
Return the number of Gaussian modes.
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.
Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST | |