Go to the documentation of this file.
10 #define CPointPDFSOG_H
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;
const_iterator end() const
void drawSingleSample(CPoint3D &outSample) const MRPT_OVERRIDE
Draw a sample from the pdf.
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.
const Scalar * const_iterator
void assureSymmetry()
Assures the symmetry of the covariance matrix (eventually certain operations in the math-coprocessor ...
void changeCoordinatesReference(const CPose3D &newReferenceBase) MRPT_OVERRIDE
this = p (+) this.
const TGaussianMode & get(size_t i) const
Access to individual beacons.
A gaussian distribution for 3D points.
void normalizeWeights()
Normalize the weights in m_modes such as the maximum log-weight is 0.
#define DEFINE_SERIALIZABLE_POST_CUSTOM_BASE(class_name, base_name)
bool empty() const
Return whether there is any Gaussian mode.
double ESS() const
Computes the "Effective sample size" (typical measure for Particle Filters), applied to the weights o...
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
TGaussianMode & get(size_t i)
Access to individual beacons.
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),...
void clear()
Clear all the gaussian modes.
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",...
double log_w
The log-weight.
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
std::deque< TGaussianMode >::iterator iterator
std::deque< TGaussianMode >::const_iterator const_iterator
void resize(const size_t N)
Resize the number of SOG modes.
void copyFrom(const CPointPDF &o) MRPT_OVERRIDE
Copy operator, translating if necesary (for example, between particles and gaussian representations)
A numeric matrix of compile-time fixed size.
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.
Declares a class that represents a Probability Density function (PDF) of a 3D point .
void getMean(CPoint3D &mean_point) const MRPT_OVERRIDE
Returns an estimate of the point, (the mean, or mathematical expectation of the PDF)
const_iterator begin() const
std::deque< TGaussianMode > CListGaussianModes
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
iterator erase(iterator i)
CPointPDFSOG(size_t nModes=1)
Default constructor.
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,...
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:
#define MRPT_OVERRIDE
C++11 "override" for virtuals:
size_t size() const
Return the number of Gaussian modes.
#define DEFINE_SERIALIZABLE_PRE_CUSTOM_BASE(class_name, base_name)
This declaration must be inserted in all CSerializable classes definition, before the class declarati...
void push_back(const TGaussianMode &m)
Inserts a copy of the given mode into the SOG.
Page generated by Doxygen 1.8.20 for MRPT 1.4.0 SVN: at Thu Aug 27 02:40:23 UTC 2020 | | |