The Sparta Modeling Framework
|
#include <BasicHistogram.hpp>
Public Member Functions | |
BasicHistogram (sparta::StatisticSet &sset, const std::string &name, const std::string &desc, const std::vector< BucketT > &buckets) | |
Construct a BasicHistogram. | |
~BasicHistogram () | |
Destroy, non-virtual. | |
void | addValue (const BucketT &val) |
Charge a bucket where the given val falls. | |
BasicHistogram (const BasicHistogram &)=delete | |
Disallow copies/assignment/move. | |
BasicHistogram (BasicHistogram &&)=delete | |
const BasicHistogram & | operator= (const BasicHistogram &)=delete |
BasicHistogram & | operator= (BasicHistogram &&)=delete |
BucketT | Type contained in the buckets |
ASSERT_ON_UNDERFLOW | (default false) true will assert if an underflow is detected |
This class will create sparta::Counters for each "bucket" of BucketT given in the contructor
The objects contained in the buckets must follow these rules:
A "bucket" is charged a count if an object being added is less than the given bucket. Examples:
Definition at line 42 of file BasicHistogram.hpp.
|
inline |
Construct a BasicHistogram.
sset | The sparta::StatisticSet this histogram belongs to |
name | The name of thie BasicHistogram |
desc | A useful description |
buckets | one bucket will be created per value (plus one for overflow) - values must be sorted |
Definition at line 52 of file BasicHistogram.hpp.
|
inline |
Destroy, non-virtual.
Definition at line 92 of file BasicHistogram.hpp.
|
inline |
Charge a bucket where the given val falls.
val | The value to charge |
A "bucket" is charged a count if an object being added is less than the given bucket. Overflows will go into the last bucket. Undeflows will either assert or charge to the smallest bucket (depending on class template parameter ASSERT_ON_UNDERFLOW)
Definition at line 103 of file BasicHistogram.hpp.