32 for(
size_t i = 0; i < bin_probs.size(); ++i){
33 if(bin_counts[i] > (2*std_dev)){
34 total += bin_probs[i];
53 const double left_interval = mean + std_dev;
54 const double right_interval = mean + (2 * std_dev);
61 for(
size_t i = 0; i < bin_probs.size(); ++i){
62 if(bin_counts[i] > left_interval && bin_counts[i] <= right_interval){
63 total += bin_probs[i];
66 if(uf > left_interval && uf <= right_interval){
69 if(of > left_interval && of <= right_interval){
82 const double left_interval = mean;
83 const double right_interval = mean + std_dev;
90 for(
size_t i = 0; i < bin_probs.size(); ++i){
91 if(bin_counts[i] > left_interval && bin_counts[i] <= right_interval){
92 total += bin_probs[i];
95 if(uf > left_interval && uf <= right_interval){
98 if(of > left_interval && of <= right_interval){
111 const double left_interval = mean - std_dev;
112 const double right_interval = mean;
119 for(
size_t i = 0; i < bin_probs.size(); ++i){
120 if(bin_counts[i] > left_interval && bin_counts[i] <= right_interval){
121 total += bin_probs[i];
124 if(uf > left_interval && uf <= right_interval){
127 if(of > left_interval && of <= right_interval){
140 const double left_interval = mean - (2 * std_dev);
141 const double right_interval = mean - std_dev;
148 for(
size_t i = 0; i < bin_probs.size(); ++i){
149 if(bin_counts[i] > left_interval && bin_counts[i] <= right_interval){
150 total += bin_probs[i];
153 if(uf > left_interval && uf <= right_interval){
156 if(of > left_interval && of <= right_interval){
174 for(
size_t i = 0; i < bin_probs.size(); ++i){
175 if(bin_counts[i] < (2*std_dev)){
176 total += bin_probs[i];
179 if(uf < (2*std_dev)){
182 if(of < (2*std_dev)){
207 for(
size_t i = 0; i < bin_probs.size(); ++i){
208 if(bin_counts[i] > (2*std_dev)){
209 total += bin_probs[i];
212 if(uf > (2*std_dev)){
215 if(of > (2*std_dev)){
228 const double left_interval = mean + std_dev;
229 const double right_interval = mean + (2 * std_dev);
236 for(
size_t i = 0; i < bin_probs.size(); ++i){
237 if(bin_counts[i] > left_interval && bin_counts[i] <= right_interval){
238 total += bin_probs[i];
241 if(uf > left_interval && uf <= right_interval){
244 if(of > left_interval && of <= right_interval){
257 const double left_interval = mean;
258 const double right_interval = mean + std_dev;
265 for(
size_t i = 0; i < bin_probs.size(); ++i){
266 if(bin_counts[i] > left_interval && bin_counts[i] <= right_interval){
267 total += bin_probs[i];
270 if(uf > left_interval && uf <= right_interval){
273 if(of > left_interval && of <= right_interval){
286 const double left_interval = mean - std_dev;
287 const double right_interval = mean;
294 for(
size_t i = 0; i < bin_probs.size(); ++i){
295 if(bin_counts[i] > left_interval && bin_counts[i] <= right_interval){
296 total += bin_probs[i];
299 if(uf > left_interval && uf <= right_interval){
302 if(of > left_interval && of <= right_interval){
315 const double left_interval = mean - (2 * std_dev);
316 const double right_interval = mean - std_dev;
323 for(
size_t i = 0; i < bin_probs.size(); ++i){
324 if(bin_counts[i] > left_interval && bin_counts[i] <= right_interval){
325 total += bin_probs[i];
328 if(uf > left_interval && uf <= right_interval){
331 if(of > left_interval && of <= right_interval){
349 for(
size_t i = 0; i < bin_probs.size(); ++i){
350 if(bin_counts[i] < (2*std_dev)){
351 total += bin_probs[i];
354 if(uf < (2*std_dev)){
357 if(of < (2*std_dev)){
CycleHistogram implementation using sparta CycleCounter.
Histogram implementation using sparta Counters.
double getStandardDeviation() const
Calculate Standard Deviation of counts in bins. This API also takes into account the count in underfl...
const sparta::CycleCounter & getOverflowBin() const
Return count of overflow bin.
const sparta::CycleCounter & getUnderflowBin() const
Return count of underflow bin.
double getUnderflowProbability() const
Return underflow probability.
double getOverflowProbability() const
Return overflow probability.
const std::vector< double > & recomputeRegularBinProbabilities() const
Return vector of probabilities regular bins.
double getMeanBinCount() const
Calculate the mean bin count of all the bins. This API also takes into account the count in underflow...
const std::vector< sparta::CycleCounter > & getRegularBin() const
Return vector of regular bin counts.
CycleHistogramTreeNode class for uint64_t values.
double getOverflowProbability() const
Return overflow probability.
const sparta::Counter & getUnderflowBin() const
Return count of underflow bin.
const std::vector< double > & recomputeRegularBinProbabilities() const
Return vector of probabilities regular bins.
double getStandardDeviation() const
Calculate Standard Deviation of counts in bins. This API also takes into account the count in underfl...
double getUnderflowProbability() const
Return underflow probability.
const sparta::Counter & getOverflowBin() const
Return count of overflow bin.
const std::vector< sparta::Counter > & getRegularBin() const
Return vector of regular bin counts.
double getMeanBinCount() const
Calculate the mean bin count of all the bins. This API also takes into account the count in underflow...