Loading...
Searching...
No Matches
casacore::StatsHistogram< AccumType > Class Template Reference

Represents an unfilled histogram with equal width bins for binning used for quantile computations. More...

`#include <StatsHistogram.h>`

## Public Member Functions

| StatsHistogram ()=delete
| StatsHistogram (AccumType minLimit, AccumType maxLimit, uInt nBins)
| Construct a histogram by specifying its minimum and maximum values and the number of desired bins.
| ~StatsHistogram ()
AccumType | getBinWidth () const
| get the binWidth.
uInt | getIndex (AccumType value) const
| get the index of the bin containing the specified value
const std::vector< AccumType > & | getMaxBinLimits () const
| max limit values for all bins
AccumType | getMaxHistLimit () const
| max limit value of entire histogram (ie max limit value of last bin)
AccumType | getMinHistLimit () const
| min limit value of entire histogram (ie min limit value of first bin)
uInt | getNBins () const
| get the number of bins

## Private Member Functions

void | _minMaxIdxRange (Int &minIdx, Int &maxIdx, AccumType value, Bool higher) const
uInt | _getUInt (const casacore::Complex &)
| The Complex and DComplex versions are used solely to permit compilation.
uInt | _getUInt (const casacore::DComplex &)

## Static Private Member Functions

static uInt | _getUInt (const AccumType &v)
| This does the obvious conversions.

## Private Attributes

AccumType | _binWidth
AccumType | _minHistLimit
AccumType | _maxHistLimit
uInt | _nBins
std::vector< AccumType > | _maxBinLimits
| maximum values for all bins

## Detailed Description

template<class AccumType>
class casacore::StatsHistogram< AccumType >

Represents an unfilled histogram with equal width bins for binning used for quantile computations.

It is necessary to store the min/max values of the bin limits, because machine precision issues when the bin width is sufficiently small can cause slightly different results for these when different methods are used to compute them, leading to accounting errors when the histogram is filled with data.

Definition at line 47 of file StatsHistogram.h.

## Constructor & Destructor Documentation

## StatsHistogram() [1/2]

template<class AccumType>

casacore::StatsHistogram< AccumType >::StatsHistogram | ( |  | ) |

delete

## StatsHistogram() [2/2]

template<class AccumType>

casacore::StatsHistogram< AccumType >::StatsHistogram | ( | AccumType | minLimit,
|  | AccumType | maxLimit,
|  | uInt | nBins )

Construct a histogram by specifying its minimum and maximum values and the number of desired bins.

No padding of the min/max values is done internally, so the caller should do that prior to construction if necessary.

## ~StatsHistogram()

template<class AccumType>

casacore::StatsHistogram< AccumType >::~StatsHistogram | ( |  | ) |

## Member Function Documentation

## _getUInt() [1/3]

template<class AccumType>

uInt casacore::StatsHistogram< AccumType >::_getUInt | ( | const AccumType & | v | ) |

inline static private

This does the obvious conversions.

The Complex and DComplex specializations (implemented below after the close of the class definition) are used solely to permit compilation. In general, those versions should never actually be called

Definition at line 89 of file StatsHistogram.h.

## _getUInt() [2/3]

uInt casacore::StatsHistogram< casacore::Complex >::_getUInt | ( | const casacore::Complex & |  | ) |

inline private

The Complex and DComplex versions are used solely to permit compilation.

In general, these versions should never actually be called

Definition at line 104 of file StatsHistogram.h.

References ThrowCc.

## _getUInt() [3/3]

uInt casacore::StatsHistogram< casacore::DComplex >::_getUInt | ( | const casacore::DComplex & |  | ) |

inline private

Definition at line 114 of file StatsHistogram.h.

References ThrowCc.

## _minMaxIdxRange()

template<class AccumType>

void casacore::StatsHistogram< AccumType >::_minMaxIdxRange | ( | Int & | minIdx,
|  | Int & | maxIdx,
|  | AccumType | value,
|  | Bool | higher ) const

private

References casacore::NewDelAllocator< T >::value.

## getBinWidth()

template<class AccumType>

AccumType casacore::StatsHistogram< AccumType >::getBinWidth | ( |  | ) | const

get the binWidth.

Referenced by casacore::operator<<().

## getIndex()

template<class AccumType>

uInt casacore::StatsHistogram< AccumType >::getIndex | ( | AccumType | value | ) | const

get the index of the bin containing the specified value

References casacore::NewDelAllocator< T >::value.

## getMaxBinLimits()

template<class AccumType>

const std::vector< AccumType > & casacore::StatsHistogram< AccumType >::getMaxBinLimits | ( |  | ) | const

max limit values for all bins

## getMaxHistLimit()

template<class AccumType>

AccumType casacore::StatsHistogram< AccumType >::getMaxHistLimit | ( |  | ) | const

max limit value of entire histogram (ie max limit value of last bin)

Referenced by casacore::operator<<().

## getMinHistLimit()

template<class AccumType>

AccumType casacore::StatsHistogram< AccumType >::getMinHistLimit | ( |  | ) | const

min limit value of entire histogram (ie min limit value of first bin)

Referenced by casacore::operator<<().

## getNBins()

template<class AccumType>

uInt casacore::StatsHistogram< AccumType >::getNBins | ( |  | ) | const

get the number of bins

Referenced by casacore::operator<<().

## Member Data Documentation

## _binWidth

template<class AccumType>

AccumType casacore::StatsHistogram< AccumType >::_binWidth

private

Definition at line 80 of file StatsHistogram.h.

## _maxBinLimits

template<class AccumType>

std::vector<AccumType> casacore::StatsHistogram< AccumType >::_maxBinLimits

private

maximum values for all bins

Definition at line 83 of file StatsHistogram.h.

## _maxHistLimit

template<class AccumType>

AccumType casacore::StatsHistogram< AccumType >::_maxHistLimit

private

Definition at line 80 of file StatsHistogram.h.

## _minHistLimit

template<class AccumType>

AccumType casacore::StatsHistogram< AccumType >::_minHistLimit

private

Definition at line 80 of file StatsHistogram.h.

## _nBins

template<class AccumType>

uInt casacore::StatsHistogram< AccumType >::_nBins

private

Definition at line 81 of file StatsHistogram.h.

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

- scimath/StatsFramework/StatsHistogram.h