25 #ifndef WHISTOGRAMBASIC_H
26 #define WHISTOGRAMBASIC_H
31 #include "WHistogram.h"
69 virtual size_t operator[](
size_t index )
const;
78 virtual size_t at(
size_t index )
const;
112 virtual void insert(
double value );
127 #endif // WHISTOGRAMBASIC_H
Container which associate values with (uniform width) bins (aka intervals or buckets).
virtual void insert(double value)
Inserts a given value within the given range (min, max) into exactly one bin and increment its size...
double m_intervalWidth
The width of an interval is precomputed to save performance.
size_t valuesSize() const
Computes the number of inserted values so far.
virtual double getBucketSize(size_t index=0) const
Return the size of one specific bucket.
Container which associate values with (uniform width) bins (aka intervals or buckets).
~WHistogramBasic()
Default destructor.
virtual size_t at(size_t index) const
Get the count of the specified bucket.
virtual size_t operator[](size_t index) const
Get the count of the specified bucket.
std::vector< size_t > m_bins
Bins to associate with the values.
virtual std::pair< double, double > getIntervalForIndex(size_t index) const
Returns the actual interval associated with the given index.
WHistogramBasic(double min, double max, size_t buckets=1000)
Default constructor.