schemeFlt.hpp

Go to the documentation of this file.
00001 #ifndef _BAYES_FILTER_SCHEME
00002 #define _BAYES_FILTER_SCHEME
00003 
00004 /*
00005  * Bayes++ the Bayesian Filtering Library
00006  * Copyright (c) 2002 Michael Stevens
00007  * See accompanying Bayes++.htm for terms and conditions of use.
00008  *
00009  * $Id: schemeFlt.hpp 562 2006-04-05 20:46:23 +0200 (Wed, 05 Apr 2006) mistevens $
00010  */
00011 
00012 /*
00013  * Generic Filter
00014  *  Filter schemes vary in their constructor parameterisation
00015  *  Filter_scheme derives a generic filter with consistent constructor interface
00016  *
00017  *  Provides specialisations for all Bayesian_filter schemes
00018  */
00019 
00020 
00021 /* Filter namespace */
00022 namespace Bayesian_filter
00023 {
00024 
00025 template <class Scheme>
00026 struct Filter_scheme : public Scheme
00027 /*
00028  * A Generic Filter Scheme
00029  *  Class template to provide a consistent constructor interface
00030  *  Default for Kalman_state_filter
00031  */
00032 {
00033     Filter_scheme(std::size_t x_size, std::size_t q_maxsize, std::size_t z_initialsize) :
00034         Kalman_state_filter (x_size), Scheme (x_size, z_initialsize)
00035     {}
00036 };
00037 
00038 
00039 // UD_filter specialisation
00040 template <>
00041 struct Filter_scheme<UD_scheme> : public UD_scheme
00042 {
00043     Filter_scheme(std::size_t x_size, std::size_t q_maxsize, std::size_t z_initialsize) :
00044         Kalman_state_filter (x_size), UD_scheme (x_size, q_maxsize, z_initialsize)
00045     {}
00046 };
00047 
00048 // Information_scheme specialisation
00049 template <>
00050 struct Filter_scheme<Information_scheme> : public Information_scheme
00051 {
00052     Filter_scheme(std::size_t x_size, std::size_t q_maxsize, std::size_t z_initialsize) :
00053         Kalman_state_filter (x_size), Information_state_filter (x_size),
00054         Information_scheme (x_size, z_initialsize)
00055     {}
00056 };
00057 
00058 // Information_root_info_scheme specialisation
00059 template <>
00060 struct Filter_scheme<Information_root_info_scheme> : public Information_root_info_scheme
00061 {
00062     Filter_scheme(std::size_t x_size, std::size_t q_maxsize, std::size_t z_initialsize) :
00063         Kalman_state_filter (x_size), Information_state_filter (x_size),
00064         Information_root_info_scheme (x_size, z_initialsize)
00065     {}
00066 };
00067 
00068 // SIR_scheme specialisation, inconsistent constructor
00069 template <>
00070 struct Filter_scheme<SIR_scheme> : public SIR_scheme
00071 {
00072     Filter_scheme(std::size_t x_size, std::size_t s_size, SIR_random& random_helper) :
00073         Sample_state_filter (x_size, s_size),
00074         SIR_scheme (x_size, s_size, random_helper)
00075     {}
00076 };
00077 
00078 // SIR_kalman_scheme specialisation, inconsistent constructor
00079 template <>
00080 struct Filter_scheme<SIR_kalman_scheme> : public SIR_kalman_scheme
00081 {
00082     Filter_scheme(std::size_t x_size, std::size_t s_size, SIR_random& random_helper) :
00083         Sample_state_filter (x_size, s_size),
00084         Kalman_state_filter (x_size),
00085         SIR_kalman_scheme (x_size, s_size, random_helper)
00086     {}
00087 };
00088 
00089 
00090 }//namespace
00091 #endif

Generated on Wed Oct 4 22:57:23 2006 for Bayes++ Bayesian Filtering Classes by  doxygen 1.4.6