Bayesian Filtering Library Generated from SVN r
|
00001 // Copyright (C) 2003 Klaas Gadeyne <first dot last at gmail dot com> 00002 00003 /*************************************************************************** 00004 * This library is free software; you can redistribute it and/or * 00005 * modify it under the terms of the GNU General Public * 00006 * License as published by the Free Software Foundation; * 00007 * version 2 of the License. * 00008 * * 00009 * As a special exception, you may use this file as part of a free * 00010 * software library without restriction. Specifically, if other files * 00011 * instantiate templates or use macros or inline functions from this * 00012 * file, or you compile this file and link it with other files to * 00013 * produce an executable, this file does not by itself cause the * 00014 * resulting executable to be covered by the GNU General Public * 00015 * License. This exception does not however invalidate any other * 00016 * reasons why the executable file might be covered by the GNU General * 00017 * Public License. * 00018 * * 00019 * This library is distributed in the hope that it will be useful, * 00020 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00021 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 00022 * Lesser General Public License for more details. * 00023 * * 00024 * You should have received a copy of the GNU General Public * 00025 * License along with this library; if not, write to the Free Software * 00026 * Foundation, Inc., 59 Temple Place, * 00027 * Suite 330, Boston, MA 02111-1307 USA * 00028 * * 00029 ***************************************************************************/ 00030 00031 // $Id: optimalimportancefilter.h 29830 2009-01-14 15:10:41Z kgadeyne $ 00032 00033 #ifndef __OPTIMALIMPORTANCE_FILTER__ 00034 #define __OPTIMALIMPORTANCE_FILTER__ 00035 00036 #include "particlefilter.h" 00037 00038 namespace BFL 00039 { 00040 00042 00067 template <typename StateVar, typename MeasVar> class Optimalimportancefilter 00068 : public ParticleFilter<StateVar,MeasVar> 00069 { 00070 protected: 00072 00076 virtual void ConstructProposal(SystemModel<StateVar>* const sysmodel, 00077 MeasurementModel<MeasVar,StateVar>* const measmodel); 00078 00079 public: 00081 00088 OptimalImportanceFilter(MCPdf<StateVar> * prior, 00089 int resampleperiod = 0, 00090 double resamplethreshold = 0, 00091 int resamplescheme = DEFAULT_RS); 00092 00094 virtual ~OptimalImportanceFilter(); 00096 OptimalImportanceFilter(const OptimalImportanceFilter<StateVar,MeasVar> & filt); 00097 00098 virtual void Update(SystemModel<StateVar>* const sysmodel, 00099 const StateVar& u, 00100 MeasurementModel<MeasVar,StateVar>* const measmodel, 00101 const MeasVar& z, 00102 const StateVar& s); 00103 virtual void Update(SystemModel<StateVar>* const sysmodel, 00104 MeasurementModel<MeasVar,StateVar>* const measmodel, 00105 const MeasVar& z, 00106 const StateVar& s); 00107 virtual void Update(SystemModel<StateVar>* const sysmodel, 00108 MeasurementModel<MeasVar,StateVar>* const measmodel, 00109 const MeasVar& z); 00110 virtual void Update(SystemModel<StateVar>* const sysmodel, 00111 const StateVar& u, 00112 MeasurementModel<MeasVar,StateVar>* const measmodel, 00113 const MeasVar& z); 00114 00116 virtual void Update(SystemModel<StateVar>* const sysmodel, 00117 const StateVar& u); 00118 virtual void Update(SystemModel<StateVar>* const sysmodel); 00119 00121 virtual void Update(MeasurementModel<MeasVar,StateVar>* const measmodel, 00122 const MeasVar& z, 00123 const StateVar& s); 00124 virtual void Update(MeasurementModel<MeasVar,StateVar>* const measmodel, 00125 const MeasVar& z); 00126 }; 00127 00128 #include "optimalimportancefilter.cpp" 00129 00130 } 00131 00132 #endif // __OPTIMALIMPORTANCE_FILTER__