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