Bayesian Filtering Library Generated from SVN r
systemmodel.h
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., 51 Franklin Street, Fifth Floor, *
28 * Boston, MA 02110-1301 USA *
29 * *
30 ***************************************************************************/
31#ifndef __SYSTEM_MODEL__
32#define __SYSTEM_MODEL__
33
34#include "../pdf/conditionalpdf.h"
35
36namespace BFL
37{
38
48 template<typename T> class SystemModel
49 {
50 protected:
51
53 /* @bug Since, for now, the library only supports only conditional
54 arguments of the same type, both X and U have to be of the same
55 type (ie both continu or both discrete!). I imagine there must
56 be systems for which this approach is not general enough @see
57 ConditionalPdf
58 */
60
63
64 public:
66
71
73 virtual ~SystemModel();
74
77
79
81 int StateSizeGet() const;
82
84 bool SystemWithoutInputs() const;
85
86 // NO LONGER RELEVANT
87 // void StateSizeSet(int); // necessary??
88 // Get Input Size
89 /* @return the statesize of the system
90 */
91 // int InputSizeGet() const;
92 // void InputSizeSet(int); // necessary??
93
95
98
100
103
105
117 T Simulate (const T& x, const T& u, const SampleMthd sampling_method = SampleMthd::DEFAULT, void * sampling_args = NULL);
119
131 T Simulate (const T& x, const SampleMthd sampling_method = SampleMthd::DEFAULT, void * sampling_args = NULL);
132
134
140 Probability ProbabilityGet(const T& x_k, const T& x_kminusone, const T& u );
141
143
148 Probability ProbabilityGet(const T& x_k, const T& x_kminusone );
149
150
151 };
152
153#include "systemmodel.cpp"
154
155} // End namespace BFL
156
157#endif // __SYSTEM_MODEL__
Abstract Class representing conditional Pdfs P(x | ...)
Class representing a probability (a double between 0 and 1)
Definition: bfl_constants.h:38
T Simulate(const T &x, const SampleMthd sampling_method=SampleMthd::DEFAULT, void *sampling_args=NULL)
Simulate the system (no input system)
bool _systemWithoutInputs
System with no inputs?
Definition: systemmodel.h:62
int StateSizeGet() const
Get State Size.
SystemModel(ConditionalPdf< T, T > *systempdf=NULL)
Constructor.
ConditionalPdf< T, T > * SystemPdfGet()
Get the SystemPDF.
virtual ~SystemModel()
Destructor.
void SystemPdfSet(ConditionalPdf< T, T > *pdf)
Set the SystemPDF.
T Simulate(const T &x, const T &u, const SampleMthd sampling_method=SampleMthd::DEFAULT, void *sampling_args=NULL)
Simulate the system.
Probability ProbabilityGet(const T &x_k, const T &x_kminusone)
Get the probability of arriving in a next state.
Probability ProbabilityGet(const T &x_k, const T &x_kminusone, const T &u)
Get the probability of arriving in a next state.
bool SystemWithoutInputs() const
Has the system inputs or not.
ConditionalPdf< T, T > * _SystemPdf
ConditionalPdf representing .
Definition: systemmodel.h:59