File indexing completed on 2026-08-06 09:24:27
0001
0002
0003
0004
0005
0006
0007
0008 #ifndef MYSTATISTICS_Bin_hpp_included
0009 #define MYSTATISTICS_Bin_hpp_included
0010
0011 #include <utility>
0012 #include <cfloat>
0013
0014 #include "Counter.h"
0015
0016 namespace Statistics {
0017
0018
0019
0020
0021
0022 class Bin
0023 : public Counter {
0024
0025 public:
0026
0027
0028
0029
0030 explicit Bin(const std::pair<double,double>& newBoundaries =
0031 std::make_pair(-DBL_MAX,DBL_MAX));
0032
0033
0034
0035
0036 virtual ~Bin();
0037
0038
0039
0040
0041 const std::pair<double,double>& boundaries() const { return theBoundaries; }
0042
0043 public:
0044
0045
0046
0047
0048 Bin& operator+=(const Bin& other);
0049
0050
0051
0052
0053 Bin& operator-=(const Bin& other);
0054
0055 public:
0056
0057
0058
0059
0060 void fromXML(const XML::Element&);
0061
0062
0063
0064
0065 XML::Element toXML() const;
0066
0067 private:
0068
0069
0070
0071
0072 std::pair<double,double> theBoundaries;
0073
0074 };
0075
0076 }
0077
0078 #endif