GestureRecognitionToolkit  Version: 1.0 Revision: 04-03-15
The Gesture Recognition Toolkit (GRT) is a cross-platform, open-source, c++ machine learning library for real-time gesture recognition.
LeakyIntegrator.h
Go to the documentation of this file.
1 
29 #ifndef GRT_LEAKY_INTEGRATOR_HEADER
30 #define GRT_LEAKY_INTEGRATOR_HEADER
31 
32 #include "../CoreModules/PreProcessing.h"
33 
34 namespace GRT{
35 
37 public:
44  LeakyIntegrator(const double leakRate = 0.99,const UINT numDimensions = 1);
45 
51  LeakyIntegrator(const LeakyIntegrator &rhs);
52 
56  virtual ~LeakyIntegrator();
57 
65 
74  virtual bool deepCopyFrom(const PreProcessing *preProcessing);
75 
84  virtual bool process(const VectorDouble &inputVector);
85 
93  virtual bool reset();
94 
102  virtual bool saveModelToFile(fstream &file) const;
103 
111  virtual bool loadModelFromFile(fstream &file);
112 
120  bool init(const double leakRate,const UINT numDimensions);
121 
128  double update(const double x);
129 
136  VectorDouble update(const VectorDouble &x);
137 
145  bool setLeakRate(const double leakRate);
146 
152  double getLeakRate();
153 
156 
157 protected:
158  double leakRate;
159  VectorDouble y;
160 
162 
163 };
164 
165 }//End of namespace GRT
166 
167 #endif //GRT_LeakyIntegrator_HEADER
bool setLeakRate(const double leakRate)
double leakRate
The current leak rate.
virtual bool deepCopyFrom(const PreProcessing *preProcessing)
virtual bool loadModelFromFile(string filename)
virtual bool loadModelFromFile(fstream &file)
Definition: AdaBoost.cpp:25
virtual bool process(const VectorDouble &inputVector)
virtual bool saveModelToFile(string filename) const
LeakyIntegrator(const double leakRate=0.99, const UINT numDimensions=1)
virtual bool saveModelToFile(fstream &file) const
VectorDouble y
A buffer holding the previous input value(s)
double update(const double x)
LeakyIntegrator & operator=(const LeakyIntegrator &rhs)