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 // $Id: bootstrapfilter.h 29830 2009-01-14 15:10:41Z kgadeyne $ 00031 00032 #ifndef __BOOTSTRAP_FILTER__ 00033 #define __BOOTSTRAP_FILTER__ 00034 00035 #include "particlefilter.h" 00036 00037 namespace BFL 00038 { 00039 00041 00071 template <typename StateVar, typename MeasVar> class BootstrapFilter 00072 : public ParticleFilter<StateVar,MeasVar> 00073 { 00074 protected: 00076 virtual bool UpdateInternal(SystemModel<StateVar>* const sysmodel, 00077 const StateVar& u, 00078 MeasurementModel<MeasVar,StateVar>* const measmodel, 00079 const MeasVar& z, 00080 const StateVar& s); 00081 00082 public: 00084 00091 BootstrapFilter(MCPdf<StateVar> * prior, 00092 int resampleperiod = 0, 00093 double resamplethreshold = 0, 00094 int resamplescheme = DEFAULT_RS); 00095 00097 00105 BootstrapFilter(MCPdf<StateVar> * prior, 00106 MCPdf<StateVar> * post, 00107 int resampleperiod = 0, 00108 double resamplethreshold = 0, 00109 int resamplescheme = DEFAULT_RS); 00110 00112 virtual ~BootstrapFilter(); 00113 00114 // Default Copy constructor will do 00115 00116 }; 00117 00118 #include "bootstrapfilter.cpp" 00119 00120 } 00121 00122 #endif // __BOOTSTRAP_FILTER__