ApplyFilter.h
Go to the documentation of this file.00001 #ifndef APPLYFILTER_H_
00002 #define APPLYFILTER_H_
00003
00004 #include "AdaptiveFilter.h"
00005 #include "TimeSeriesComponent.h"
00006 #include <boost/shared_ptr.hpp>
00007 #include <vector>
00008
00009 namespace gplib
00010 {
00011
00012
00013
00014
00015 class ApplyFilter
00016 {
00017 private:
00018 bool showprogress;
00019 bool wanthistory;
00020 int shift;
00021 AdaptiveFilter &Filter;
00022 int weightsaveintervall;
00023 std::vector<gplib::rvec> WeightHistory;
00024 std::vector<TimeSeriesComponent*> InputChannels;
00025 std::vector<TimeSeriesComponent*> RefChannels;
00026 std::vector<boost::shared_ptr<TimeSeriesComponent> > OutChannels;
00027 std::vector<std::vector<double> > EpsValues;
00028 public:
00029
00030 void ShowProgress(const bool what)
00031 {
00032 showprogress = what;
00033 }
00034
00035 gplib::rmat GetWeightHistory();
00036
00037 void SetWeightSaveIntervall(const int intervall)
00038 {
00039 weightsaveintervall = intervall;
00040 }
00041
00042 const std::vector<boost::shared_ptr<TimeSeriesComponent> > &GetOutChannels()
00043 {
00044 return OutChannels;
00045 }
00046
00047 const std::vector<std::vector<double> > &GetEpsValues()
00048 {
00049 return EpsValues;
00050 }
00051
00052 void SetShift(const int theshift)
00053 {
00054 shift = theshift;
00055 }
00056
00057 void AddInputChannel(TimeSeriesComponent &Channel);
00058
00059 void AddReferenceChannel(TimeSeriesComponent &Channel);
00060
00061 void FilterData();
00062
00063 ApplyFilter(AdaptiveFilter &TheFilter, bool keephistory = false);
00064 virtual ~ApplyFilter();
00065
00066 };
00067
00068 }
00069 #endif