MRPT  1.9.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-2018, 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 #pragma once
10 
12 #include <mrpt/poses/CPoint2D.h>
13 
14 namespace mrpt::poses
15 {
16 /** Declares a class that represents a Probability Distribution function (PDF)
17  * of a 2D point (x,y).
18  * This class is just the base class for unifying many diferent
19  * ways this PDF can be implemented.
20  *
21  * For convenience, a pose composition is also defined for any
22  * PDF derived class, changeCoordinatesReference, in the form of a method
23  * rather than an operator.
24  *
25  * For a similar class for 6D poses (a 3D point with attitude), see CPose3DPDF
26  *
27  * See also the tutorial on <a
28  * href="http://www.mrpt.org/Probability_Density_Distributions_Over_Spatial_Representations"
29  * >probabilistic spatial representations in the MRPT</a>.
30  * \ingroup poses_pdf_grp
31  * \sa CPoint2D, CPointPDF
32  */
34  public mrpt::math::CProbabilityDensityFunction<CPoint2D, 2>
35 {
37 
38  public:
39  /** Copy operator, translating if necesary (for example, between particles
40  * and gaussian representations)
41  */
42  virtual void copyFrom(const CPoint2DPDF& o) = 0;
43 
44  virtual void changeCoordinatesReference(
45  const CPose3D& newReferenceBase) = 0;
46 
47  /** Bayesian fusion of two point distributions (product of two
48  * distributions->new distribution), then save the result in this object
49  * (WARNING: See implementing classes to see classes that can and cannot be
50  * mixtured!)
51  * \param p1 The first distribution to fuse
52  * \param p2 The second distribution to fuse
53  * \param minMahalanobisDistToDrop If set to different of 0, the result of
54  * very separate Gaussian modes (that will result in negligible components)
55  * in SOGs will be dropped to reduce the number of modes in the output.
56  */
57  virtual void bayesianFusion(
58  const CPoint2DPDF& p1, const CPoint2DPDF& p2,
59  const double minMahalanobisDistToDrop = 0) = 0;
60 
61  enum
62  {
64  };
65  static constexpr bool is_3D() { return is_3D_val != 0; }
66  enum
67  {
69  };
70  static constexpr bool is_PDF() { return is_PDF_val != 0; }
71 }; // End of class def.
72 
73 }
74 
#define DEFINE_VIRTUAL_SERIALIZABLE(class_name)
This declaration must be inserted in virtual CSerializable classes definition:
virtual void changeCoordinatesReference(const CPose3D &newReferenceBase)=0
virtual void bayesianFusion(const CPoint2DPDF &p1, const CPoint2DPDF &p2, const double minMahalanobisDistToDrop=0)=0
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!)
Declares a class that represents a Probability Distribution function (PDF) of a 2D point (x...
Definition: CPoint2DPDF.h:33
static constexpr bool is_3D()
Definition: CPoint2DPDF.h:65
Classes for 2D/3D geometry representation, both of single values and probability density distribution...
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Definition: CPose3D.h:86
The virtual base class which provides a unified interface for all persistent objects in MRPT...
Definition: CSerializable.h:30
static constexpr bool is_PDF()
Definition: CPoint2DPDF.h:70
A generic template for probability density distributions (PDFs).
virtual void copyFrom(const CPoint2DPDF &o)=0
Copy operator, translating if necesary (for example, between particles and gaussian representations) ...



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 7d5e6d718 Fri Aug 24 01:51:28 2018 +0200 at lun nov 2 08:35:50 CET 2020