9 #ifndef CPosePDFGaussianInf_H 10 #define CPosePDFGaussianInf_H 44 void assureSymmetry();
84 this->cov_inv.inv(
cov);
105 void changeCoordinatesReference(
const CPose2D &newReferenceBase );
108 void rotateCov(
const double ang);
114 void inverseComposition(
124 void drawManySamples(
size_t N, std::vector<mrpt::math::CVectorDouble> & outSamples )
const MRPT_OVERRIDE;
141 void operator += ( const
CPose2D &Ap);
144 double evaluatePDF( const
CPose2D &
x ) const;
147 double evaluateNormalizedPDF( const
CPose2D &
x ) const;
157 this->inverseComposition(*
this,
ref);
DEFINE_SERIALIZABLE_POST_CUSTOM_BASE(CPose3DPDFGaussianInf, CPose3DPDF)
CPosePDFGaussianInf(const CPose3DPDF &o)
Copy constructor, including transformations between other PDFs.
bool isInfType() const MRPT_OVERRIDE
Returns whether the class instance holds the uncertainty in covariance or information form...
#define MRPT_OVERRIDE
C++11 "override" for virtuals:
void getMean(CPose2D &mean_pose) const MRPT_OVERRIDE
Returns an estimate of the pose, (the mean, or mathematical expectation of the PDF).
mrpt::math::TPoint2D BASE_IMPEXP operator+(const CPose2D &pose, const mrpt::math::TPoint2D &pnt)
Compose a 2D point from a new coordinate base given by a 2D pose.
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...
GLsizei GLsizei GLuint * obj
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...
CPosePDFGaussianInf(const CPosePDF &o)
Copy constructor, including transformations between other PDFs.
const CPose2D & getPoseMean() const
CPose2D BASE_IMPEXP operator-(const CPose2D &p)
Unary - operator: return the inverse pose "-p" (Note that is NOT the same than a pose with negative x...
Eigen::Matrix< dataType, 4, 4 > inverse(Eigen::Matrix< dataType, 4, 4 > &pose)
#define DEFINE_SERIALIZABLE_PRE_CUSTOM_BASE(class_name, base_name)
This declaration must be inserted in all CSerializable classes definition, before the class declarati...
GLsizei const GLchar ** string
Declares a class that represents a probability density function (pdf) of a 2D pose (x...
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 Probability Density function (PDF) of a 2D pose as a Gaussian with a mean and the inverse of the c...
CPose2D mean
The mean value.
bool operator==(const CPoint< DERIVEDCLASS > &p1, const CPoint< DERIVEDCLASS > &p2)
A class used to store a 2D pose, including the 2D coordinate point and a heading (phi) angle...
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
void getCovarianceAndMean(mrpt::math::CMatrixDouble33 &cov, CPose2D &mean_point) const MRPT_OVERRIDE
Returns an estimate of the pose covariance matrix (3x3 cov matrix) and the mean, both at once...
virtual void getInformationMatrix(mrpt::math::CMatrixDouble33 &inf) const MRPT_OVERRIDE
Returns the information (inverse covariance) matrix (a STATE_LEN x STATE_LEN matrix) ...
CPosePDFGaussianInf self_t
GLubyte GLubyte GLubyte a
Declares a class that represents a Probability Density Function (PDF) of a 3D pose (6D actually)...
mrpt::math::CMatrixDouble33 cov_inv
The inverse of the 3x3 covariance matrix (the "information" matrix)
EIGEN_STRONG_INLINE double mean() const
Computes the mean of the entire matrix.
std::ostream & operator<<(std::ostream &o, const CPoint< DERIVEDCLASS > &p)
Dumps a point as a string [x,y] or [x,y,z].