GComm  0.2.3
histogram.hpp
1 /*
2  * Copyright (C) 2009 Codership Oy <info@codership.com>
3  */
4 
5 #ifndef GCOMM_HISTOGRAM_HPP
6 #define GCOMM_HISTOGRAM_HPP
7 
8 #include <map>
9 #include <ostream>
10 
11 
12 namespace gcomm
13 {
14  class Histogram
15  {
16  public:
17  Histogram(const std::string&);
18  void insert(const double);
19  void clear();
20  friend std::ostream& operator<<(std::ostream&, const Histogram&);
21  private:
22  std::map<double, long long> cnt_;
23  };
24 
25  std::ostream& operator<<(std::ostream&, const Histogram&);
26 }
27 
28 
29 #endif // GCOMM_HISTOGRAM_HPP
Definition: histogram.hpp:14