Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #include "bootstrapfilter.h"
00020 #include "../sample/weightedsample.h"
00021
00022 #define StateVar SVar
00023 #define MeasVar MVar
00024
00025 template <typename SVar, typename MVar>
00026 BootstrapFilter<SVar,MVar>::BootstrapFilter(MCPdf<SVar> * prior,
00027 int resampleperiod,
00028 double resamplethreshold,
00029 int resamplescheme)
00030 : ParticleFilter<SVar,MVar>(prior,NULL,resampleperiod,
00031 resamplethreshold,
00032 resamplescheme)
00033 {
00034
00035
00036 this->_proposal_depends_on_meas = false;
00037 }
00038
00039
00040 template <typename SVar, typename MVar>
00041 BootstrapFilter<SVar,MVar>::BootstrapFilter(MCPdf<SVar> * prior,
00042 MCPdf<SVar> * post,
00043 int resampleperiod,
00044 double resamplethreshold,
00045 int resamplescheme)
00046 : ParticleFilter<SVar,MVar>(prior,post,NULL,resampleperiod,
00047 resamplethreshold,
00048 resamplescheme)
00049 {
00050
00051
00052 this->_proposal_depends_on_meas = false;
00053 }
00054
00055
00056
00057
00058 template <typename SVar, typename MVar>
00059 BootstrapFilter<SVar,MVar>::~BootstrapFilter(){}
00060
00061 template <typename SVar, typename MVar> bool
00062 BootstrapFilter<SVar,MVar>::UpdateInternal(SystemModel<SVar>* const sysmodel,
00063 const SVar& u,
00064 MeasurementModel<MVar,SVar>* const measmodel,
00065 const MVar& z,
00066 const SVar& s)
00067 {
00068 bool result = true;
00069
00070 if (sysmodel != NULL){
00071 this->ProposalSet(sysmodel->SystemPdfGet());
00072 result = this->ParticleFilter<SVar,MVar>::UpdateInternal(sysmodel,u,NULL,z,s) && result;
00073 }
00074 if (measmodel != NULL)
00075 result = this->ParticleFilter<SVar,MVar>::UpdateInternal(NULL,u,measmodel,z,s) && result;
00076
00077 return result;
00078 }
00079
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 Fri Aug 28 2015 10:10:21