measurementmodel.h
Go to the documentation of this file.
1 // $Id$
2 // Copyright (C) 2002 Klaas Gadeyne <first dot last at gmail dot com>
3 //
4  /***************************************************************************
5  * This library is free software; you can redistribute it and/or *
6  * modify it under the terms of the GNU General Public *
7  * License as published by the Free Software Foundation; *
8  * version 2 of the License. *
9  * *
10  * As a special exception, you may use this file as part of a free *
11  * software library without restriction. Specifically, if other files *
12  * instantiate templates or use macros or inline functions from this *
13  * file, or you compile this file and link it with other files to *
14  * produce an executable, this file does not by itself cause the *
15  * resulting executable to be covered by the GNU General Public *
16  * License. This exception does not however invalidate any other *
17  * reasons why the executable file might be covered by the GNU General *
18  * Public License. *
19  * *
20  * This library is distributed in the hope that it will be useful, *
21  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
22  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
23  * Lesser General Public License for more details. *
24  * *
25  * You should have received a copy of the GNU General Public *
26  * License along with this library; if not, write to the Free Software *
27  * Foundation, Inc., 59 Temple Place, *
28  * Suite 330, Boston, MA 02111-1307 USA *
29  * *
30  ***************************************************************************/
31 //
32 #ifndef __MEASUREMENT_MODEL__
33 #define __MEASUREMENT_MODEL__
34 
35 #include "../pdf/conditionalpdf.h"
36 
37 namespace BFL
38 {
39 
40 #define NUMBER_OF_CONDITIONAL_ARGS 2
41 
53  template<typename MeasVar, typename StateVar> class MeasurementModel {
54  protected:
56  /* @bug Since, for now, the library only supports only conditional
57  arguments of the same type, both X and U have to be of the same
58  type (ie both continu or both discrete!). I imagine there must
59  be systems for which this approach is not general enough @see
60  ConditionalPdf
61  */
63 
66 
67  public:
69 
75  virtual ~MeasurementModel();
76 
78  int MeasurementSizeGet() const;
79 
81  bool SystemWithoutSensorParams() const;
82 
85 
87 
90 
92 
103  MeasVar Simulate (const StateVar& x, const StateVar& s, int sampling_method = DEFAULT, void * sampling_args = NULL);
104 
106 
116  MeasVar Simulate (const StateVar& x, int sampling_method = DEFAULT, void * sampling_args = NULL);
117 
119 
125  Probability ProbabilityGet(const MeasVar& z, const StateVar& x, const StateVar& s );
126 
128 
134  Probability ProbabilityGet(const MeasVar& z, const StateVar& x );
135  };
136 
137 #include "measurementmodel.cpp"
139 } // End namespace BFL
140 
141 #endif // __MEASUREMENT_MODEL__
#define DEFAULT
int MeasurementSizeGet() const
Get Measurement Size.
bool SystemWithoutSensorParams() const
Number of Conditional Arguments.
#define StateVar
Definition: asirfilter.h:22
Probability ProbabilityGet(const MeasVar &z, const StateVar &x, const StateVar &s)
Get the probability of a certain measurement.
ConditionalPdf< MeasVar, StateVar > * _MeasurementPdf
ConditionalPdf representing .
MeasVar Simulate(const StateVar &x, const StateVar &s, int sampling_method=DEFAULT, void *sampling_args=NULL)
Simulate the Measurement, given a certain state, and an input.
ConditionalPdf< MeasVar, StateVar > * MeasurementPdfGet()
Get the MeasurementPDF.
#define MeasVar
Definition: asirfilter.h:23
void MeasurementPdfSet(ConditionalPdf< MeasVar, StateVar > *pdf)
Set the MeasurementPDF.
Class representing a probability (a double between 0 and 1)
Definition: bfl_constants.h:39
MeasurementModel(ConditionalPdf< MeasVar, StateVar > *Measurementpdf=NULL)
Constructor.
virtual ~MeasurementModel()
Destructor.
bool _systemWithoutSensorParams
System with no sensor params??


bfl
Author(s): Klaas Gadeyne, Wim Meeussen, Tinne Delaet and many others. See web page for a full contributor list. ROS package maintained by Wim Meeussen.
autogenerated on Mon Jun 10 2019 12:47:59