Protium
Math and Design Features
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Pages
Protium::Containers::Histogram< BinType > Class Template Reference

#include <Histogram.h>

Classes

struct  Bin
 

Public Member Functions

 Histogram (const BinType &lowerEdge, const BinType &upperEdge, const unsigned &nBins)
 Most Basic Histogram instantiation. Creates uniform size bins. More...
 
unsigned GetBinContentByI (const int &i) const
 
BinType GetBinWidthByI (const int &i) const
 
BinType GetLowerEdgeByI (const int &i) const
 
unsigned GetNBins () const
 
void SetNewBin (const BinType &lowerEdge, const BinType &delta)
 

Private Attributes

std::map< Bin, unsigned > fContents
 

Detailed Description

template<class BinType = double>
class Protium::Containers::Histogram< BinType >

Definition at line 12 of file Histogram.h.

Constructor & Destructor Documentation

template<class BinType = double>
Protium::Containers::Histogram< BinType >::Histogram ( const BinType &  lowerEdge,
const BinType &  upperEdge,
const unsigned &  nBins 
)
inline

Most Basic Histogram instantiation. Creates uniform size bins.

Definition at line 36 of file Histogram.h.

Member Function Documentation

template<class BinType = double>
unsigned Protium::Containers::Histogram< BinType >::GetBinContentByI ( const int &  i) const
inline

Definition at line 86 of file Histogram.h.

template<class BinType = double>
BinType Protium::Containers::Histogram< BinType >::GetBinWidthByI ( const int &  i) const
inline

Definition at line 77 of file Histogram.h.

template<class BinType = double>
BinType Protium::Containers::Histogram< BinType >::GetLowerEdgeByI ( const int &  i) const
inline

Definition at line 68 of file Histogram.h.

template<class BinType = double>
unsigned Protium::Containers::Histogram< BinType >::GetNBins ( ) const
inline

Definition at line 45 of file Histogram.h.

template<class BinType = double>
void Protium::Containers::Histogram< BinType >::SetNewBin ( const BinType &  lowerEdge,
const BinType &  delta 
)
inline

Use this for Rebinning. Bins overlapping this one get resized so that: The bin overlapping the lower edge gets rebinned to the lower edge The bin overlapping the upper edge gets rebinned to the upper edge The bins overlapping the middle range (inclduing those with matching edges of the new bin) get deleted and replaced by the new bin (bin content gets transferred).

Definition at line 55 of file Histogram.h.

Member Data Documentation

template<class BinType = double>
std::map<Bin, unsigned> Protium::Containers::Histogram< BinType >::fContents
private

Definition at line 32 of file Histogram.h.