10 #define CPointPDFSOG_H
63 void assureSymmetry();
100 m_modes.push_back(m);
103 iterator
begin() {
return m_modes.begin(); }
104 iterator
end() {
return m_modes.end(); }
105 const_iterator
begin()
const {
return m_modes.begin(); }
106 const_iterator
end()
const {
return m_modes.end(); }
108 iterator
erase(iterator i) {
return m_modes.erase(i); }
110 void resize(
const size_t N);
111 size_t size()
const {
return m_modes.size(); }
112 bool empty()
const {
return m_modes.empty(); }
117 void getMean(
CPoint3D &mean_point)
const;
126 void normalizeWeights();
137 void copyFrom(
const CPointPDF &o);
158 void changeCoordinatesReference(
const CPose3D &newReferenceBase );
162 void drawSingleSample(
CPoint3D &outSample)
const;
169 void bayesianFusion(
const CPointPDF &p1,
const CPointPDF &p2,
const double &minMahalanobisDistToDrop = 0);
174 void evaluatePDFInArea(
182 bool sumOverAllZs =
false );
188 bool sumOverAllZs )
const;
This class is a "CSerializable" wrapper for "CMatrixTemplateNumeric".
void saveToTextFile(const std::string &file, mrpt::math::TMatrixTextFileFormat fileFormat=mrpt::math::MATRIX_FORMAT_ENG, bool appendMRPTHeader=false, const std::string &userHeader=std::string()) const
Save matrix to a text file, compatible with MATLAB text format (see also the methods of matrix classe...
std::deque< TGaussianMode > CListGaussianModes
Declares a class that represents a Probability Density function (PDF) of a 3D point ...
The struct for each mode:
const Scalar * const_iterator
const_iterator begin() const
bool empty() const
Return whether there is any Gaussian mode.
A numeric matrix of compile-time fixed size.
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 push_back(const TGaussianMode &m)
Inserts a copy of the given mode into the SOG.
std::deque< TGaussianMode >::const_iterator const_iterator
#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 class used to store a 3D point.
iterator erase(iterator i)
size_t size() const
Return the number of Gaussian modes.
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...
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
#define DEFINE_SERIALIZABLE_POST_CUSTOM_BASE(class_name, base_name)
double log_w
The log-weight.
const_iterator end() const
std::deque< TGaussianMode >::iterator iterator
Declares a class that represents a Probability Distribution function (PDF) of a 3D point (x...
CListGaussianModes m_modes
The list of SOG modes.
A gaussian distribution for 3D points.