Main MRPT website > C++ reference for MRPT 1.5.9
CPoint2DPDF.h
Go to the documentation of this file.
1 /* +---------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | http://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2017, Individual contributors, see AUTHORS file |
6  | See: http://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See details in http://www.mrpt.org/License |
8  +---------------------------------------------------------------------------+ */
9 #ifndef CPoint2DPDF_H
10 #define CPoint2DPDF_H
11 
14 #include <mrpt/poses/CPoint2D.h>
15 
16 namespace mrpt
17 {
18 namespace poses
19 {
21 
22  /** Declares a class that represents a Probability Distribution function (PDF) of a 2D point (x,y).
23  * This class is just the base class for unifying many diferent
24  * ways this PDF can be implemented.
25  *
26  * For convenience, a pose composition is also defined for any
27  * PDF derived class, changeCoordinatesReference, in the form of a method rather than an operator.
28  *
29  * For a similar class for 6D poses (a 3D point with attitude), see CPose3DPDF
30  *
31  * See also the tutorial on <a href="http://www.mrpt.org/Probability_Density_Distributions_Over_Spatial_Representations" >probabilistic spatial representations in the MRPT</a>.
32  * \ingroup poses_pdf_grp
33  * \sa CPoint2D, CPointPDF
34  */
35  class BASE_IMPEXP CPoint2DPDF : public mrpt::utils::CSerializable, public mrpt::utils::CProbabilityDensityFunction<CPoint2D,2>
36  {
38 
39  public:
40  /** Copy operator, translating if necesary (for example, between particles and gaussian representations)
41  */
42  virtual void copyFrom(const CPoint2DPDF &o) = 0;
43 
44  /** Bayesian fusion of two point distributions (product of two distributions->new distribution), then save the result in this object (WARNING: See implementing classes to see classes that can and cannot be mixtured!)
45  * \param p1 The first distribution to fuse
46  * \param p2 The second distribution to fuse
47  * \param minMahalanobisDistToDrop If set to different of 0, the result of very separate Gaussian modes (that will result in negligible components) in SOGs will be dropped to reduce the number of modes in the output.
48  */
49  virtual void bayesianFusion( const CPoint2DPDF &p1, const CPoint2DPDF &p2, const double &minMahalanobisDistToDrop = 0) = 0 ;
50 
51  enum { is_3D_val = 0 };
52  static inline bool is_3D() { return is_3D_val!=0; }
53  enum { is_PDF_val = 1 };
54  static inline bool is_PDF() { return is_PDF_val!=0; }
55 
56  }; // End of class def.
58 
59 
60  } // End of namespace
61 } // End of namespace
62 
63 #endif
The virtual base class which provides a unified interface for all persistent objects in MRPT...
Definition: CSerializable.h:39
static bool is_PDF()
Definition: CPoint2DPDF.h:54
#define DEFINE_VIRTUAL_SERIALIZABLE(class_name)
This declaration must be inserted in virtual CSerializable classes definition:
Declares a class that represents a Probability Distribution function (PDF) of a 2D point (x...
Definition: CPoint2DPDF.h:35
#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 2D point.
Definition: CPoint2D.h:36
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
#define DEFINE_SERIALIZABLE_POST_CUSTOM_BASE(class_name, base_name)



Page generated by Doxygen 1.8.14 for MRPT 1.5.9 Git: 690a4699f Wed Apr 15 19:29:53 2020 +0200 at miƩ abr 15 19:30:12 CEST 2020