58 typedef std::deque<TGaussianMode>::iterator
iterator;
100 m_modes.push_back(m);
111 size_t size()
const {
return m_modes.size(); }
112 bool empty()
const {
return m_modes.empty(); }
164 void evaluatePDFInArea(
171 mrpt::math::CMatrixD &outMatrix,
172 bool sumOverAllZs = false );
175 double evaluatePDF( const
CPoint3D &x,
bool sumOverAllZs ) const;
#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...
A numeric matrix of compile-time fixed size.
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 .
iterator erase(iterator i)
size_t size() const
Return the number of Gaussian modes.
std::deque< TGaussianMode > CListGaussianModes
void copyFrom(const CPointPDF &o) MRPT_OVERRIDE
Copy operator, translating if necesary (for example, between particles and gaussian representations)
const_iterator begin() const
CPointPDFSOG(size_t nModes=1)
Default constructor.
void getMean(CPoint3D &mean_point) const MRPT_OVERRIDE
Returns an estimate of the point, (the mean, or mathematical expectation of the PDF)
CListGaussianModes m_modes
The list of SOG modes.
void changeCoordinatesReference(const CPose3D &newReferenceBase) MRPT_OVERRIDE
this = p (+) this.
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),...
std::deque< TGaussianMode >::const_iterator const_iterator
void normalizeWeights()
Normalize the weights in m_modes such as the maximum log-weight is 0.
void clear()
Clear all the gaussian modes.
void push_back(const TGaussianMode &m)
Inserts a copy of the given mode into the SOG.
void saveToTextFile(const std::string &file) const MRPT_OVERRIDE
Save the density to a text file, with the following format: There is one row per Gaussian "mode",...
TGaussianMode & get(size_t i)
Access to individual beacons.
std::deque< TGaussianMode >::iterator iterator
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.
double ESS() const
Computes the "Effective sample size" (typical measure for Particle Filters), applied to the weights o...
const TGaussianMode & get(size_t i) const
Access to individual beacons.
void assureSymmetry()
Assures the symmetry of the covariance matrix (eventually certain operations in the math-coprocessor ...
void resize(const size_t N)
Resize the number of SOG modes.
bool empty() const
Return whether there is any Gaussian mode.
const_iterator end() const
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 drawSingleSample(CPoint3D &outSample) const MRPT_OVERRIDE
Draw a sample from the pdf.
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
#define MRPT_OVERRIDE
C++11 "override" for virtuals:
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
The struct for each mode:
double log_w
The log-weight.