SST::Statistics::Histogram< HistoBinType, HistoCountType > Class Template Reference

Holder of data grouped into pre-determined width bins. More...

#include <histo.h>

Inheritance diagram for SST::Statistics::Histogram< HistoBinType, HistoCountType >:
SST::Statistics::BaseStatistic

Public Types

typedef std::map< HistoBinType,
HistoCountType >::iterator 
histo_itr
 Iterator over the histogram bins.

Public Member Functions

 Histogram (const std::string name, HistoBinType binW)
 Creates a new bin with a specific bin width.
 Histogram (const char *name, HistoBinType binW)
 Creates a new bin with a specific bin width.
void add (HistoBinType value)
 Adds a new value to the histogram.
HistoCountType getBinCount ()
 Count how many bins are active in this histogram.
HistoBinType getBinWidth ()
 Get the width of a bin in this histogram.
HistoCountType getBinCountByBinStart (HistoBinType v)
 Get the count of items in the bin by the start value (e.g.
HistoBinType getBinStart ()
 Get the smallest start value of a bin in this histogram (i.e.
HistoBinType getBinEnd ()
 Get the largest possible value represented by this histogram (i.e.
HistoCountType getItemCount ()
 Get the total number of items contained in all bins.
HistoBinType getValuesSummed ()
 Sum up every item presented for storage in the histogram.

Detailed Description

template<class HistoBinType, class HistoCountType>
class SST::Statistics::Histogram< HistoBinType, HistoCountType >

Holder of data grouped into pre-determined width bins.

Template Parameters:
HistoBinType is the type of the data held in each bin (i.e. what data type described the width of the bin)
HistoCountType is the count type of data held in each bin (i.e. what data type counts the number of items held in the bin itself)

Constructor & Destructor Documentation

template<class HistoBinType , class HistoCountType >
SST::Statistics::Histogram< HistoBinType, HistoCountType >::Histogram ( const std::string  name,
HistoBinType  binW 
) [inline]

Creates a new bin with a specific bin width.

Parameters:
binW The width of the bin
template<class HistoBinType , class HistoCountType >
SST::Statistics::Histogram< HistoBinType, HistoCountType >::Histogram ( const char *  name,
HistoBinType  binW 
) [inline]

Creates a new bin with a specific bin width.

Parameters:
binW] The width of the bin
name] Pointer to a name of the histogram variable (this is a description for the statistic engine to use in output)

Member Function Documentation

template<class HistoBinType , class HistoCountType >
void SST::Statistics::Histogram< HistoBinType, HistoCountType >::add ( HistoBinType  value  )  [inline]

Adds a new value to the histogram.

The correct bin is identified and then incremented. If no bin can be found to hold the value then a new bin is created.

template<class HistoBinType , class HistoCountType >
HistoCountType SST::Statistics::Histogram< HistoBinType, HistoCountType >::getBinCountByBinStart ( HistoBinType  v  )  [inline]

Get the count of items in the bin by the start value (e.g.

give me the count of items in the bin which begins at value X).

Returns:
The count of items in the bin else 0.
template<class HistoBinType , class HistoCountType >
HistoBinType SST::Statistics::Histogram< HistoBinType, HistoCountType >::getBinEnd (  )  [inline]

Get the largest possible value represented by this histogram (i.e.

the highest value in any of items bins rounded above to the size of the bin)

template<class HistoBinType , class HistoCountType >
HistoBinType SST::Statistics::Histogram< HistoBinType, HistoCountType >::getBinStart (  )  [inline]

Get the smallest start value of a bin in this histogram (i.e.

the minimum value possibly represented by this histogram)

template<class HistoBinType , class HistoCountType >
HistoCountType SST::Statistics::Histogram< HistoBinType, HistoCountType >::getItemCount (  )  [inline]

Get the total number of items contained in all bins.

Returns:
The number of items contained in all bins
template<class HistoBinType , class HistoCountType >
HistoBinType SST::Statistics::Histogram< HistoBinType, HistoCountType >::getValuesSummed (  )  [inline]

Sum up every item presented for storage in the histogram.

Returns:
The sum of all values added into the histogram

The documentation for this class was generated from the following file:

Generated on 14 Sep 2015 for SST by  doxygen 1.6.1