00001 #ifndef INDII_ML_FILTER_TWOFILTERSMOOTHER_HPP
00002 #define INDII_ML_FILTER_TWOFILTERSMOOTHER_HPP
00003
00004 #include "../aux/vector.hpp"
00005 #include "../aux/Pdf.hpp"
00006
00007 #include "Smoother.hpp"
00008
00009 namespace indii {
00010 namespace ml {
00011 namespace filter {
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 template <class T = unsigned int, class P = indii::ml::aux::GaussianPdf>
00027 class TwoFilterSmoother : public Smoother<T,P> {
00028 public:
00029
00030
00031
00032
00033
00034
00035
00036 TwoFilterSmoother(const T tT, const P& p_xT);
00037
00038
00039
00040
00041 virtual ~TwoFilterSmoother();
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051 P& getBackwardFilteredState();
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061 void setBackwardFilteredState(const P& p_xtn_ytn);
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075 virtual void smooth(const T tn, const aux::vector& ytn,
00076 const P& p_xtn_ytn) = 0;
00077
00078
00079
00080
00081
00082
00083
00084 virtual aux::GaussianPdf backwardMeasure() = 0;
00085
00086 protected:
00087
00088
00089
00090 P p_xtn_ytn_b;
00091
00092 };
00093
00094 }
00095 }
00096 }
00097
00098 template <class T, class P>
00099 indii::ml::filter::TwoFilterSmoother<T,P>::TwoFilterSmoother(const T tT,
00100 const P& p_xT) : Smoother<T,P>(tT, p_xT), p_xtn_ytn_b(p_xT) {
00101
00102 }
00103
00104 template <class T, class P>
00105 indii::ml::filter::TwoFilterSmoother<T,P>::~TwoFilterSmoother() {
00106
00107 }
00108
00109 template <class T, class P>
00110 inline P& indii::ml::filter::TwoFilterSmoother<T,P>::getBackwardFilteredState() {
00111 return this->p_xtn_ytn_b;
00112 }
00113
00114 template <class T, class P>
00115 void indii::ml::filter::TwoFilterSmoother<T,P>::setBackwardFilteredState(
00116 const P& p_xtn_ytn) {
00117 this->p_xtn_ytn_b = p_xtn_ytn;
00118 }
00119
00120 #endif
00121