systemmodel.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 #ifndef __SYSTEM_MODEL__
32 #define __SYSTEM_MODEL__
33 
34 #include "../pdf/conditionalpdf.h"
35 
36 namespace 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 
70  SystemModel(ConditionalPdf<T,T>* systempdf=NULL);
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, int sampling_method = DEFAULT, void * sampling_args = NULL);
119 
131  T Simulate (const T& x, int sampling_method = 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__
bool SystemWithoutInputs() const
Has the system inputs or not.
Definition: systemmodel.cpp:84
SystemModel(ConditionalPdf< T, T > *systempdf=NULL)
Constructor.
Definition: systemmodel.cpp:21
#define DEFAULT
bool _systemWithoutInputs
System with no inputs?
Definition: systemmodel.h:62
ConditionalPdf< T, T > * _SystemPdf
ConditionalPdf representing .
Definition: systemmodel.h:59
int StateSizeGet() const
Get State Size.
Definition: systemmodel.cpp:78
void SystemPdfSet(ConditionalPdf< T, T > *pdf)
Set the SystemPDF.
Definition: systemmodel.cpp:98
virtual ~SystemModel()
Destructor.
Definition: systemmodel.cpp:53
ConditionalPdf< T, T > * SystemPdfGet()
Get the SystemPDF.
Definition: systemmodel.cpp:91
Probability ProbabilityGet(const T &x_k, const T &x_kminusone, const T &u)
Get the probability of arriving in a next state.
T Simulate(const T &x, const T &u, int sampling_method=DEFAULT, void *sampling_args=NULL)
Simulate the system.
Definition: systemmodel.h:126
Class representing a probability (a double between 0 and 1)
Definition: bfl_constants.h:39


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 Feb 28 2022 21:56:33