Khangai Robot Play - Naive  01
THe naive play of the Khangai Robot
smoothing_algorithm.h
Go to the documentation of this file.
1 
2 #ifndef _SMOOTHING_ALGORITHM_H_
3 #define _SMOOTHING_ALGORITHM_H_
4 
5 #include "vec3.h"
6 
8 {
9 public:
10  virtual float smooth(const float &input) = 0;
11  virtual ~Smoothing_Algorithm() { }
12 };
13 
15 {
16 public:
17  Exp_Smooth();
18  Exp_Smooth(float alpha);
19  Exp_Smooth(Exp_Smooth &&) = default;
20  Exp_Smooth(const Exp_Smooth &) = default;
21  Exp_Smooth &operator=(Exp_Smooth &&) = default;
22  Exp_Smooth &operator=(const Exp_Smooth &) = default;
24 
25  void set_Alpha(float alpha) { alpha_ = alpha; }
26 
27  float smooth(const float &input);
28 
29  void clear();
30 
31 private:
32  float last_output_;
33  float alpha_;
34  bool is_first_;
35 };
36 
37 #endif // !_SMOOTHING_ALGORITHM_H_
Exp_Smooth()
Definition: exp_smooth.cpp:12
void clear()
Definition: exp_smooth.cpp:38
float last_output_
Definition: smoothing_algorithm.h:32
Definition: smoothing_algorithm.h:7
virtual float smooth(const float &input)=0
~Exp_Smooth()
Definition: smoothing_algorithm.h:23
void set_Alpha(float alpha)
Definition: smoothing_algorithm.h:25
Definition: smoothing_algorithm.h:14
Exp_Smooth & operator=(Exp_Smooth &&)=default
bool is_first_
Definition: smoothing_algorithm.h:34
float alpha_
Definition: smoothing_algorithm.h:33
float smooth(const float &input)
Definition: exp_smooth.cpp:24
virtual ~Smoothing_Algorithm()
Definition: smoothing_algorithm.h:11