histogramfilter.h
Go to the documentation of this file.
1 // $Id: histogramfilter.h 14935 2007-12-17 $
2 // Copyright (C) 2007 Tinne De Laet <tinne dot delaet at mech dot kuleuven dot be>
3 //
4 // This program is free software; you can redistribute it and/or modify
5 // it under the terms of the GNU Lesser General Public License as published by
6 // the Free Software Foundation; either version 2.1 of the License, or
7 // (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Lesser General Public License for more details.
13 //
14 // You should have received a copy of the GNU Lesser General Public License
15 // along with this program; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 //
18 
19 #ifndef __HISTOGRAM_FILTER__
20 #define __HISTOGRAM_FILTER__
21 
22 #include "filter.h"
23 #include "../pdf/discretepdf.h"
24 #include "../model/measurementmodel.h"
25 #include "../model/discretesystemmodel.h"
26 
27 namespace BFL
28 {
29 
31 
49 template <typename MeasVar> class HistogramFilter : public Filter<int,MeasVar>
50 {
51 public:
53 
57 
59  virtual ~HistogramFilter();
60 
61  // implement virtual function
62  virtual DiscretePdf* PostGet();
63 
64 protected:
66  vector<Probability > _old_prob;
68  vector<Probability > _new_prob;
69 
74  void SysUpdate(SystemModel<int>* const sysmodel,
75  const int& u);
76 
78 
86  void MeasUpdate(MeasurementModel<MeasVar,int>* const measmodel,
87  const MeasVar& z,
88  const int& s);
89 
90  bool UpdateInternal(SystemModel<int>* const sysmodel,
91  const int& u,
92  MeasurementModel<MeasVar,int>* const measmodel,
93  const MeasVar& z,
94  const int& s);
95 }; // class
96 
97 
98 #include "histogramfilter.cpp"
99 
100 } // End namespace BFL
101 
102 #endif // __HISTOGRAM_FILTER__
Abstract class representing an interface for Bayesian Filters.
Definition: filter.h:77
bool UpdateInternal(SystemModel< int > *const sysmodel, const int &u, MeasurementModel< MeasVar, int > *const measmodel, const MeasVar &z, const int &s)
Actual implementation of Update, varies along filters.
Class representing a PDF on a discrete variable.
Definition: discretepdf.h:34
Class representing the histogram filter.
virtual ~HistogramFilter()
Destructor.
void MeasUpdate(MeasurementModel< MeasVar, int > *const measmodel, const MeasVar &z, const int &s)
Measurement Update.
virtual DiscretePdf * PostGet()
Get Posterior density.
void SysUpdate(SystemModel< int > *const sysmodel, const int &u)
HistogramFilter(DiscretePdf *prior)
Constructor.
vector< Probability > _old_prob
While updating store list of old probabilities.
#define MeasVar
Definition: asirfilter.h:23
vector< Probability > _new_prob
While updating store list of new probabilities.


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