GestureRecognitionToolkit  Version: 0.1.0
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 GRT_BEGIN_NAMESPACE
35 
37 public:
44  LeakyIntegrator(const Float 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 VectorFloat &inputVector);
85 
93  virtual bool reset();
94 
102  virtual bool saveModelToFile( std::fstream &file ) const;
103 
111  virtual bool loadModelFromFile( std::fstream &file );
112 
120  bool init(const Float leakRate,const UINT numDimensions);
121 
128  Float update(const Float x);
129 
136  VectorFloat update(const VectorFloat &x);
137 
145  bool setLeakRate(const Float leakRate);
146 
152  Float getLeakRate();
153 
156 
157 protected:
158  Float leakRate;
160 
162 
163 };
164 
165 GRT_END_NAMESPACE
166 
167 #endif //GRT_LeakyIntegrator_HEADER
virtual bool reset()
LeakyIntegrator & operator=(const LeakyIntegrator &rhs)
virtual ~LeakyIntegrator()
Float update(const Float x)
LeakyIntegrator(const Float leakRate=0.99, const UINT numDimensions=1)
VectorFloat y
A buffer holding the previous input value(s)
virtual bool deepCopyFrom(const PreProcessing *preProcessing)
virtual bool loadModelFromFile(std::string filename)
bool setLeakRate(const Float leakRate)
virtual bool loadModelFromFile(std::fstream &file)
virtual bool saveModelToFile(std::fstream &file) const
virtual bool saveModelToFile(std::string filename) const
virtual bool process(const VectorFloat &inputVector)
Float leakRate
The current leak rate.