Bites
A small library of miscellaneous C++ codes.
 All Classes Namespaces Functions Friends Pages
Averager.hpp
1 #ifndef BITES_AVERAGER_HPP_INCLUDED
2 #define BITES_AVERAGER_HPP_INCLUDED
3 
4 #include <deque>
5 
6 namespace bites {
7 
11 class Averager{
12 public:
13 
18  Averager(const int& max_count);
19 
23  float add(const float& value);
24 
28  int length();
29 
30 private:
31  const int max_count;
32  std::deque<float> data;
33 };
34 
35 } // namespace bites.
36 
37 #endif // BITES_AVERAGER_HPP_INCLUDED
Definition: Averager.hpp:11
float add(const float &value)
Definition: Averager.cpp:17
Averager(const int &max_count)
Definition: Averager.cpp:10
int length()
Definition: Averager.cpp:35