backwardfilter.cpp
Go to the documentation of this file.
1 // $Id: backwardfilter.cpp 6736 2006-12-22 11:24:42Z tdelaet $
2 // Copyright (C) 2006 Tinne De Laet <first dot last 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 #include "backwardfilter.h"
20 
21 #define StateVar SVar
22 
23 // Constructor
24 template<typename SVar>
25 BackwardFilter<SVar>::BackwardFilter(Pdf<SVar>* prior)
26  : _prior(prior),
27  _timestep(0)
28 {}
29 
30 template<typename SVar>
32 
33 template<typename SVar>
35 {}
36 
37 template<typename SVar> void
39 {
40  _prior = prior;
41  _post = prior;
42 }
43 
44 template<typename SVar> int
46 {
47  return _timestep;
48 }
49 
50 template<typename SVar> bool
51 BackwardFilter<SVar>::Update(SystemModel<SVar>* const sysmodel, const SVar& u, Pdf<SVar>* const filtered_post)
52 {
53  return this->UpdateInternal(sysmodel,u,filtered_post);
54 }
55 
56 template<typename SVar> bool
57 BackwardFilter<SVar>::Update(SystemModel<SVar>* const sysmodel, Pdf<SVar>* const filtered_post)
58 {
59  SVar u;
60  return this->UpdateInternal(sysmodel,u,filtered_post);
61 }
62 
63 template<typename SVar> Pdf<SVar> *
65 {
66  return _post;
67 }
Class PDF: Virtual Base class representing Probability Density Functions.
Definition: pdf.h:53
Virtual Baseclass representing all bayesian backward filters.


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