particlesmoother.h
Go to the documentation of this file.
1 // $Id: particlesmoother.h 6736 2006-12-21 11:24:42Z tdelaet $
2 // Copyright (C) 2006 Tinne De Laet <first dot last at mech dot kuleuven dot be>
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 
33 // implementation based on "A smoothing filter for condensation", by Isard and
34 // Blake
35 // (http://www.springerlink.com/content/?k=a+smoothing+filter+for+condensation)
36 // The bacward stage version
37 // @bug still needs extra testing!
38 
39 #ifndef __PARTICLE_SMOOTHER__
40 #define __PARTICLE_SMOOTHER__
41 
42 #include "backwardfilter.h"
43 #include "../pdf/conditionalpdf.h"
44 #include "../pdf/mcpdf.h"
45 
46 namespace BFL
47 {
48 
50  template <typename StateVar> class ParticleSmoother
51  : public BackwardFilter<StateVar>
52  {
53  protected:
54  virtual bool UpdateInternal(SystemModel<StateVar>* const sysmodel,
55  const StateVar& u, Pdf<StateVar>* const filtered_post);
56 
57  virtual void SysUpdate(SystemModel<StateVar>* const sysmodel, const StateVar& u , Pdf<StateVar>* const filtered_post);
58 
60  vector<WeightedSample<StateVar> > _old_samples;
62  vector<WeightedSample<StateVar> > _new_samples;
64  vector<WeightedSample<StateVar> > _filtered_samples;
66  typename vector<WeightedSample<StateVar> >::iterator _os_it;
68  typename vector<WeightedSample<StateVar> >::iterator _ns_it;
70  typename vector<WeightedSample<StateVar> >::iterator _fs_it;
71 
72  public:
75 
77  virtual ~ParticleSmoother();
78 
79  };
80 #include "particlesmoother.cpp"
81 
82 } // End namespace BFL
83 
84 #endif // __PARTICLE_FILTER__
vector< WeightedSample< StateVar > >::iterator _ns_it
Iterator for new list of samples.
Class PDF: Virtual Base class representing Probability Density Functions.
Definition: pdf.h:53
vector< WeightedSample< StateVar > > _filtered_samples
While updating store list of filtered samples.
virtual bool UpdateInternal(SystemModel< StateVar > *const sysmodel, const StateVar &u, Pdf< StateVar > *const filtered_post)
Actual implementation of Update, varies along filters.
vector< WeightedSample< StateVar > >::iterator _os_it
Iterator for old list of samples.
Virtual Baseclass representing all bayesian backward filters.
vector< WeightedSample< StateVar > > _new_samples
While updating store list of new samples.
#define StateVar
Definition: asirfilter.h:22
virtual void SysUpdate(SystemModel< StateVar > *const sysmodel, const StateVar &u, Pdf< StateVar > *const filtered_post)
Class representing a particle backward filter.
virtual ~ParticleSmoother()
Destructor.
Monte Carlo Pdf: Sample based implementation of Pdf.
Definition: mcpdf.h:49
ParticleSmoother(MCPdf< StateVar > *prior)
Constructor.
vector< WeightedSample< StateVar > >::iterator _fs_it
Iterator for list of filtered samples.
vector< WeightedSample< StateVar > > _old_samples
While updating store list of old samples.


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