Loading...
Searching...
No Matches
casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator > Class Template Reference

Class to calculate statistics in a "classical" sense, ie using accumulators with no special filtering beyond optional range filtering etc. More...

`#include <ClassicalStatistics.h>`

## Public Member Functions

| ClassicalStatistics ()
| ClassicalStatistics (const ClassicalStatistics &cs)
| copy semantics
virtual | ~ClassicalStatistics ()
ClassicalStatistics & | operator= (const ClassicalStatistics &other)
| copy semantics
virtual StatisticsAlgorithm< CASA_STATP > * | clone () const
| Clone this instance.
virtual StatisticsData::ALGORITHM | algorithm () const
| get the algorithm that this object uses for computing stats
virtual AccumType | getMedian (std::shared_ptr< uInt64 > knownNpts=nullptr, std::shared_ptr< AccumType > knownMin=nullptr, std::shared_ptr< AccumType > knownMax=nullptr, uInt binningThreshholdSizeBytes=4096 *4096, Bool persistSortedArray=False, uInt nBins=10000)
| In the following group of methods, if the size of the composite dataset is smaller than binningThreshholdSizeBytes, the composite dataset will be (perhaps partially) sorted and persisted in memory during the call.
virtual AccumType | getMedianAndQuantiles (std::map< Double, AccumType > &quantiles, const std::set< Double > &fractions, std::shared_ptr< uInt64 > knownNpts=nullptr, std::shared_ptr< AccumType > knownMin=nullptr, std::shared_ptr< AccumType > knownMax=nullptr, uInt binningThreshholdSizeBytes=4096 *4096, Bool persistSortedArray=False, uInt nBins=10000)
| If one needs to compute both the median and quantile values, it is better to call getMedianAndQuantiles() rather than getMedian() and getQuantiles() separately, as the first will scan large data sets fewer times than calling the separate methods.
virtual AccumType | getMedianAbsDevMed (std::shared_ptr< uInt64 > knownNpts=nullptr, std::shared_ptr< AccumType > knownMin=nullptr, std::shared_ptr< AccumType > knownMax=nullptr, uInt binningThreshholdSizeBytes=4096 *4096, Bool persistSortedArray=False, uInt nBins=10000)
| get the median of the absolute deviation about the median of the data.
virtual std::map< Double, AccumType > | getQuantiles (const std::set< Double > &fractions, std::shared_ptr< uInt64 > knownNpts=nullptr, std::shared_ptr< AccumType > knownMin=nullptr, std::shared_ptr< AccumType > knownMax=nullptr, uInt binningThreshholdSizeBytes=4096 *4096, Bool persistSortedArray=False, uInt nBins=10000)
| Get the specified quantiles.
virtual void | getMinMax (AccumType &mymin, AccumType &mymax)
| scan the dataset(s) that have been added, and find the min and max.
virtual void | getMinMaxNpts (uInt64 &npts, AccumType &mymin, AccumType &mymax)
virtual uInt64 | getNPts ()
| scan the dataset(s) that have been added, and find the number of good points.
virtual std::pair< Int64, Int64 > | getStatisticIndex (StatisticsData::STATS stat)
| see base class description
virtual void | reset ()
| reset object to initial state.
virtual void | setCalculateAsAdded (Bool c)
| Should statistics be updated with calls to addData or should they only be calculated upon calls to getStatistics() etc?
virtual void | setDataProvider (StatsDataProvider< CASA_STATP > *dataProvider)
| An exception will be thrown if setCalculateAsAdded(True) has been called.
void | setQuantileComputer (std::shared_ptr< ClassicalQuantileComputer< CASA_STATP > > qc)
| Allow derived objects to set the quantile computer object.
virtual void | setStatsToCalculate (std::set< StatisticsData::STATS > &stats)
| Provide guidance to algorithms by specifying a priori which statistics the caller would like calculated.
Public Member Functions inherited from casacore::StatisticsAlgorithm< CASA_STATP >
virtual | ~StatisticsAlgorithm ()
void | addData (const DataIterator &first, uInt nr, uInt dataStride=1, Bool nrAccountsForStride=False)
| Add a dataset to an existing set of datasets on which statistics are to be calculated.
virtual CASA_STATP | getMedian (std::shared_ptr< uInt64 > knownNpts=nullptr, std::shared_ptr< CASA_STATP > knownMin=nullptr, std::shared_ptr< CASA_STATP > knownMax=nullptr, uInt binningThreshholdSizeBytes=4096 *4096, Bool persistSortedArray=False, uInt nBins=10000)=0
virtual CASA_STATP | getMedianAndQuantiles (std::map< Double, CASA_STATP > &quantileToValue, const std::set< Double > &quantiles, std::shared_ptr< uInt64 > knownNpts=nullptr, std::shared_ptr< CASA_STATP > knownMin=nullptr, std::shared_ptr< CASA_STATP > knownMax=nullptr, uInt binningThreshholdSizeBytes=4096 *4096, Bool persistSortedArray=False, uInt nBins=10000)=0
| The return value is the median; the quantiles are returned in the quantileToValue map.
virtual CASA_STATP | getMedianAbsDevMed (std::shared_ptr< uInt64 > knownNpts=nullptr, std::shared_ptr< CASA_STATP > knownMin=nullptr, std::shared_ptr< CASA_STATP > knownMax=nullptr, uInt binningThreshholdSizeBytes=4096 *4096, Bool persistSortedArray=False, uInt nBins=10000)=0
| get the median of the absolute deviation about the median of the data.
CASA_STATP | getQuantile (Double quantile, std::shared_ptr< uInt64 > knownNpts=nullptr, std::shared_ptr< CASA_STATP > knownMin=nullptr, std::shared_ptr< CASA_STATP > knownMax=nullptr, uInt binningThreshholdSizeBytes=4096 *4096, Bool persistSortedArray=False, uInt nBins=10000)
| Purposefully not virtual.
virtual std::map< Double, CASA_STATP > | getQuantiles (const std::set< Double > &quantiles, std::shared_ptr< uInt64 > npts=nullptr, std::shared_ptr< CASA_STATP > min=nullptr, std::shared_ptr< CASA_STATP > max=nullptr, uInt binningThreshholdSizeBytes=4096 *4096, Bool persistSortedArray=False, uInt nBins=10000)=0
| get a map of quantiles to values.
CASA_STATP | getStatistic (StatisticsData::STATS stat)
| get the value of the specified statistic.
StatsData< CASA_STATP > | getStatistics ()
| Return statistics.
void | setData (const DataIterator &first, uInt nr, uInt dataStride=1, Bool nrAccountsForStride=False)
| setdata() clears any current datasets or data provider and then adds the specified data set as the first dataset in the (possibly new) set of data sets for which statistics are to be calculated.

## Protected Member Functions

| ClassicalStatistics (std::shared_ptr< ClassicalQuantileComputer< CASA_STATP > > qc)
| This constructor should be used by derived objects in order to set the proper quantile computer object.
virtual void | _accumNpts (uInt64 &npts, const DataIterator &dataBegin, uInt64 nr, uInt dataStride) const
| scan through the data set to determine the number of good (unmasked, weight > 0, within range) points.
virtual void | _accumNpts (uInt64 &npts, const DataIterator &dataBegin, uInt64 nr, uInt dataStride, const DataRanges &ranges, Bool isInclude) const
virtual void | _accumNpts (uInt64 &npts, const DataIterator &dataBegin, uInt64 nr, uInt dataStride, const MaskIterator &maskBegin, uInt maskStride) const
virtual void | _accumNpts (uInt64 &npts, const DataIterator &dataBegin, uInt64 nr, uInt dataStride, const MaskIterator &maskBegin, uInt maskStride, const DataRanges &ranges, Bool isInclude) const
virtual void | _accumNpts (uInt64 &npts, const DataIterator &dataBegin, const WeightsIterator &weightsBegin, uInt64 nr, uInt dataStride) const
virtual void | _accumNpts (uInt64 &npts, const DataIterator &dataBegin, const WeightsIterator &weightsBegin, uInt64 nr, uInt dataStride, const DataRanges &ranges, Bool isInclude) const
virtual void | _accumNpts (uInt64 &npts, const DataIterator &dataBegin, const WeightsIterator &weightsBegin, uInt64 nr, uInt dataStride, const MaskIterator &maskBegin, uInt maskStride, const DataRanges &ranges, Bool isInclude) const
virtual void | _accumNpts (uInt64 &npts, const DataIterator &dataBegin, const WeightsIterator &weightBegin, uInt64 nr, uInt dataStride, const MaskIterator &maskBegin, uInt maskStride) const
void | _accumulate (StatsData< AccumType > &stats, const AccumType &datum, const LocationType &location)
void | _accumulate (StatsData< AccumType > &stats, const AccumType &datum, const AccumType &weight, const LocationType &location)
void | _addData ()
| Allows derived classes to do things after data is set or added.
void | _clearStats ()
Bool | _getDoMaxMin () const
virtual StatsData< AccumType > | _getInitialStats () const
virtual AccumType | _getStatistic (StatisticsData::STATS stat)
virtual StatsData< AccumType > | _getStatistics ()
virtual StatsData< AccumType > & | _getStatsData ()
| Retrieve stats structure.
virtual const StatsData< AccumType > & | _getStatsData () const
virtual void | _minMax (std::shared_ptr< AccumType > &mymin, std::shared_ptr< AccumType > &mymax, const DataIterator &dataBegin, uInt64 nr, uInt dataStride) const
virtual void | _minMax (std::shared_ptr< AccumType > &mymin, std::shared_ptr< AccumType > &mymax, const DataIterator &dataBegin, uInt64 nr, uInt dataStride, const DataRanges &ranges, Bool isInclude) const
virtual void | _minMax (std::shared_ptr< AccumType > &mymin, std::shared_ptr< AccumType > &mymax, const DataIterator &dataBegin, uInt64 nr, uInt dataStride, const MaskIterator &maskBegin, uInt maskStride) const
virtual void | _minMax (std::shared_ptr< AccumType > &mymin, std::shared_ptr< AccumType > &mymax, const DataIterator &dataBegin, uInt64 nr, uInt dataStride, const MaskIterator &maskBegin, uInt maskStride, const DataRanges &ranges, Bool isInclude) const
virtual void | _minMax (std::shared_ptr< AccumType > &mymin, std::shared_ptr< AccumType > &mymax, const DataIterator &dataBegin, const WeightsIterator &weightsBegin, uInt64 nr, uInt dataStride) const
virtual void | _minMax (std::shared_ptr< AccumType > &mymin, std::shared_ptr< AccumType > &mymax, const DataIterator &dataBegin, const WeightsIterator &weightsBegin, uInt64 nr, uInt dataStride, const DataRanges &ranges, Bool isInclude) const
virtual void | _minMax (std::shared_ptr< AccumType > &mymin, std::shared_ptr< AccumType > &mymax, const DataIterator &dataBegin, const WeightsIterator &weightsBegin, uInt64 nr, uInt dataStride, const MaskIterator &maskBegin, uInt maskStride, const DataRanges &ranges, Bool isInclude) const
virtual void | _minMax (std::shared_ptr< AccumType > &mymin, std::shared_ptr< AccumType > &mymax, const DataIterator &dataBegin, const WeightsIterator &weightBegin, uInt64 nr, uInt dataStride, const MaskIterator &maskBegin, uInt maskStride) const
virtual void | _minMaxNpts (uInt64 &npts, std::shared_ptr< AccumType > &mymin, std::shared_ptr< AccumType > &mymax, const DataIterator &dataBegin, uInt64 nr, uInt dataStride) const
| Sometimes we want the min, max, and npts all in one scan.
virtual void | _minMaxNpts (uInt64 &npts, std::shared_ptr< AccumType > &mymin, std::shared_ptr< AccumType > &mymax, const DataIterator &dataBegin, uInt64 nr, uInt dataStride, const DataRanges &ranges, Bool isInclude) const
virtual void | _minMaxNpts (uInt64 &npts, std::shared_ptr< AccumType > &mymin, std::shared_ptr< AccumType > &mymax, const DataIterator &dataBegin, uInt64 nr, uInt dataStride, const MaskIterator &maskBegin, uInt maskStride) const
virtual void | _minMaxNpts (uInt64 &npts, std::shared_ptr< AccumType > &mymin, std::shared_ptr< AccumType > &mymax, const DataIterator &dataBegin, uInt64 nr, uInt dataStride, const MaskIterator &maskBegin, uInt maskStride, const DataRanges &ranges, Bool isInclude) const
virtual void | _minMaxNpts (uInt64 &npts, std::shared_ptr< AccumType > &mymin, std::shared_ptr< AccumType > &mymax, const DataIterator &dataBegin, const WeightsIterator &weightsBegin, uInt64 nr, uInt dataStride) const
virtual void | _minMaxNpts (uInt64 &npts, std::shared_ptr< AccumType > &mymin, std::shared_ptr< AccumType > &mymax, const DataIterator &dataBegin, const WeightsIterator &weightsBegin, uInt64 nr, uInt dataStride, const DataRanges &ranges, Bool isInclude) const
virtual void | _minMaxNpts (uInt64 &npts, std::shared_ptr< AccumType > &mymin, std::shared_ptr< AccumType > &mymax, const DataIterator &dataBegin, const WeightsIterator &weightsBegin, uInt64 nr, uInt dataStride, const MaskIterator &maskBegin, uInt maskStride, const DataRanges &ranges, Bool isInclude) const
virtual void | _minMaxNpts (uInt64 &npts, std::shared_ptr< AccumType > &mymin, std::shared_ptr< AccumType > &mymax, const DataIterator &dataBegin, const WeightsIterator &weightBegin, uInt64 nr, uInt dataStride, const MaskIterator &maskBegin, uInt maskStride) const
std::shared_ptr< StatisticsAlgorithmQuantileComputer< CASA_STATP > > | _getQuantileComputer ()
virtual void | _unweightedStats (StatsData< AccumType > &stats, uInt64 &ngood, LocationType &location, const DataIterator &dataBegin, uInt64 nr, uInt dataStride)
| no weights, no mask, no ranges
virtual void | _unweightedStats (StatsData< AccumType > &stats, uInt64 &ngood, LocationType &location, const DataIterator &dataBegin, uInt64 nr, uInt dataStride, const DataRanges &ranges, Bool isInclude)
| no weights, no mask
virtual void | _unweightedStats (StatsData< AccumType > &stats, uInt64 &ngood, LocationType &location, const DataIterator &dataBegin, uInt64 nr, uInt dataStride, const MaskIterator &maskBegin, uInt maskStride)
virtual void | _unweightedStats (StatsData< AccumType > &stats, uInt64 &ngood, LocationType &location, const DataIterator &dataBegin, uInt64 nr, uInt dataStride, const MaskIterator &maskBegin, uInt maskStride, const DataRanges &ranges, Bool isInclude)
virtual void | _updateDataProviderMaxMin (const StatsData< AccumType > &threadStats)
virtual void | _weightedStats (StatsData< AccumType > &stats, LocationType &location, const DataIterator &dataBegin, const WeightsIterator &weightsBegin, uInt64 nr, uInt dataStride)
| has weights, but no mask, no ranges
virtual void | _weightedStats (StatsData< AccumType > &stats, LocationType &location, const DataIterator &dataBegin, const WeightsIterator &weightsBegin, uInt64 nr, uInt dataStride, const DataRanges &ranges, Bool isInclude)
virtual void | _weightedStats (StatsData< AccumType > &stats, LocationType &location, const DataIterator &dataBegin, const WeightsIterator &weightBegin, uInt64 nr, uInt dataStride, const MaskIterator &maskBegin, uInt maskStride)
virtual void | _weightedStats (StatsData< AccumType > &stats, LocationType &location, const DataIterator &dataBegin, const WeightsIterator &weightBegin, uInt64 nr, uInt dataStride, const MaskIterator &maskBegin, uInt maskStride, const DataRanges &ranges, Bool isInclude)
Protected Member Functions inherited from casacore::StatisticsAlgorithm< CASA_STATP >
| StatisticsAlgorithm ()
StatisticsAlgorithm & | operator= (const StatisticsAlgorithm &other)
| use copy semantics, except for the data provider which uses reference semantics
const StatisticsDataset< CASA_STATP > & | _getDataset () const
| These methods are purposefully not virtual.
const std::set< StatisticsData::STATS > | _getStatsToCalculate () const
virtual const std::set< StatisticsData::STATS > & | _getUnsupportedStatistics () const
void | _setUnsupportedStatistics (const std::set< StatisticsData::STATS > &stats)
| Derived classes should normally call this in their constructors, if applicable.

## Private Types

using | ChunkType

## Private Member Functions

void | _computeMinMax (std::shared_ptr< AccumType > &mymax, std::shared_ptr< AccumType > &mymin, DataIterator dataIter, MaskIterator maskIter, WeightsIterator weightsIter, uInt64 dataCount, const ChunkType &chunk)
void | _computeMinMaxNpts (uInt64 &npts, std::shared_ptr< AccumType > &mymax, std::shared_ptr< AccumType > &mymin, DataIterator dataIter, MaskIterator maskIter, WeightsIterator weightsIter, uInt64 dataCount, const ChunkType &chunk)
void | _computeNpts (uInt64 &npts, DataIterator dataIter, MaskIterator maskIter, WeightsIterator weightsIter, uInt64 dataCount, const ChunkType &chunk)
void | _computeStats (StatsData< AccumType > &stats, uInt64 &ngood, LocationType &location, DataIterator dataIter, MaskIterator maskIter, WeightsIterator weightsIter, uInt64 count, const ChunkType &chunk)
void | _doMinMax (AccumType &vmin, AccumType &vmax)
| scan dataset(s) to find min and max
uInt64 | _doMinMaxNpts (AccumType &vmin, AccumType &vmax)
uInt64 | _doNpts ()
void | _doNptsMinMax (uInt64 &mynpts, AccumType &mymin, AccumType &mymax, std::shared_ptr< uInt64 > knownNpts, std::shared_ptr< AccumType > knownMin, std::shared_ptr< AccumType > knownMax)
| for quantile computations, if necessary, determines npts, min, max to send to quantile calculator methods

## Private Attributes

StatsData< AccumType > | _statsData
Bool | _calculateAsAdded
Bool | _doMaxMin
Bool | _mustAccumulate
std::shared_ptr< ClassicalQuantileComputer< CASA_STATP > > | _qComputer

## Detailed Description

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>
class casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >

Class to calculate statistics in a "classical" sense, ie using accumulators with no special filtering beyond optional range filtering etc.

setCalculateAsAdded() allows one to specify if statistics should be calculated and updated on upon each call to set/addData(). If False, statistics will be calculated only when getStatistic(), getStatistics(), or similar statistics computing methods are called. Setting this value to True allows the caller to not have to keep all the data accessible at once. Note however, that all data must be simultaneously accessible if quantile-like (eg median) calculations are desired.

Objects of this class are instantiated using a ClassicalQuantileComputer object for computation of quantile-like statistics. See the documentation of StatisticsAlgorithm for details relating QuantileComputer classes.

Definition at line 61 of file ClassicalStatistics.h.

## Member Typedef Documentation

## ChunkType

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

using casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::ChunkType

private

Definition at line 64 of file ClassicalStatistics.h.

## Constructor & Destructor Documentation

## ClassicalStatistics() [1/3]

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::ClassicalStatistics | ( |  | ) |

Referenced by ClassicalStatistics(), and operator=().

## ClassicalStatistics() [2/3]

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::ClassicalStatistics | ( | const ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator > & | cs | ) |

copy semantics

References ClassicalStatistics().

## ~ClassicalStatistics()

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

virtual casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::~ClassicalStatistics | ( |  | ) |

virtual

## ClassicalStatistics() [3/3]

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::ClassicalStatistics | ( | std::shared_ptr< ClassicalQuantileComputer< CASA_STATP > > | qc | ) |

protected

This constructor should be used by derived objects in order to set the proper quantile computer object.

## Member Function Documentation

## _accumNpts() [1/8]

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

virtual void casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::_accumNpts | ( | uInt64 & | npts,
|  | const DataIterator & | dataBegin,
|  | const WeightsIterator & | weightBegin,
|  | uInt64 | nr,
|  | uInt | dataStride,
|  | const MaskIterator & | maskBegin,
|  | uInt | maskStride ) const

protected virtual

## _accumNpts() [2/8]

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

virtual void casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::_accumNpts | ( | uInt64 & | npts,
|  | const DataIterator & | dataBegin,
|  | const WeightsIterator & | weightsBegin,
|  | uInt64 | nr,
|  | uInt | dataStride ) const

protected virtual

## _accumNpts() [3/8]

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

virtual void casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::_accumNpts | ( | uInt64 & | npts,
|  | const DataIterator & | dataBegin,
|  | const WeightsIterator & | weightsBegin,
|  | uInt64 | nr,
|  | uInt | dataStride,
|  | const DataRanges & | ranges,
|  | Bool | isInclude ) const

protected virtual

References DataRanges.

## _accumNpts() [4/8]

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

virtual void casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::_accumNpts | ( | uInt64 & | npts,
|  | const DataIterator & | dataBegin,
|  | const WeightsIterator & | weightsBegin,
|  | uInt64 | nr,
|  | uInt | dataStride,
|  | const MaskIterator & | maskBegin,
|  | uInt | maskStride,
|  | const DataRanges & | ranges,
|  | Bool | isInclude ) const

protected virtual

References DataRanges.

## _accumNpts() [5/8]

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

virtual void casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::_accumNpts | ( | uInt64 & | npts,
|  | const DataIterator & | dataBegin,
|  | uInt64 | nr,
|  | uInt | dataStride ) const

protected virtual

scan through the data set to determine the number of good (unmasked, weight > 0, within range) points.

The first with no mask, no ranges, and no weights is trivial with npts = nr in this class, but is implemented here so that derived classes may override it.

Reimplemented in casacore::ConstrainedRangeStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >, casacore::ConstrainedRangeStatistics< CASA_STATP >, and casacore::HingesFencesStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >.

## _accumNpts() [6/8]

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

virtual void casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::_accumNpts | ( | uInt64 & | npts,
|  | const DataIterator & | dataBegin,
|  | uInt64 | nr,
|  | uInt | dataStride,
|  | const DataRanges & | ranges,
|  | Bool | isInclude ) const

protected virtual

References DataRanges.

## _accumNpts() [7/8]

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

virtual void casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::_accumNpts | ( | uInt64 & | npts,
|  | const DataIterator & | dataBegin,
|  | uInt64 | nr,
|  | uInt | dataStride,
|  | const MaskIterator & | maskBegin,
|  | uInt | maskStride ) const

protected virtual

## _accumNpts() [8/8]

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

virtual void casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::_accumNpts | ( | uInt64 & | npts,
|  | const DataIterator & | dataBegin,
|  | uInt64 | nr,
|  | uInt | dataStride,
|  | const MaskIterator & | maskBegin,
|  | uInt | maskStride,
|  | const DataRanges & | ranges,
|  | Bool | isInclude ) const

protected virtual

References DataRanges.

## _accumulate() [1/2]

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

void casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::_accumulate | ( | StatsData< AccumType > & | stats,
|  | const AccumType & | datum,
|  | const AccumType & | weight,
|  | const LocationType & | location )

inline protected

## _accumulate() [2/2]

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

void casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::_accumulate | ( | StatsData< AccumType > & | stats,
|  | const AccumType & | datum,
|  | const LocationType & | location )

inline protected

## _addData()

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

void casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::_addData | ( |  | ) |

protected virtual

Allows derived classes to do things after data is set or added.

Default implementation does nothing.

Reimplemented from casacore::StatisticsAlgorithm< CASA_STATP >.

## _clearStats()

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

void casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::_clearStats | ( |  | ) |

protected

## _computeMinMax()

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

void casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::_computeMinMax | ( | std::shared_ptr< AccumType > & | mymax,
|  | std::shared_ptr< AccumType > & | mymin,
|  | DataIterator | dataIter,
|  | MaskIterator | maskIter,
|  | WeightsIterator | weightsIter,
|  | uInt64 | dataCount,
|  | const ChunkType & | chunk )

private

## _computeMinMaxNpts()

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

void casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::_computeMinMaxNpts | ( | uInt64 & | npts,
|  | std::shared_ptr< AccumType > & | mymax,
|  | std::shared_ptr< AccumType > & | mymin,
|  | DataIterator | dataIter,
|  | MaskIterator | maskIter,
|  | WeightsIterator | weightsIter,
|  | uInt64 | dataCount,
|  | const ChunkType & | chunk )

private

## _computeNpts()

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

void casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::_computeNpts | ( | uInt64 & | npts,
|  | DataIterator | dataIter,
|  | MaskIterator | maskIter,
|  | WeightsIterator | weightsIter,
|  | uInt64 | dataCount,
|  | const ChunkType & | chunk )

private

## _computeStats()

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

void casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::_computeStats | ( | StatsData< AccumType > & | stats,
|  | uInt64 & | ngood,
|  | LocationType & | location,
|  | DataIterator | dataIter,
|  | MaskIterator | maskIter,
|  | WeightsIterator | weightsIter,
|  | uInt64 | count,
|  | const ChunkType & | chunk )

private

## _doMinMax()

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

void casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::_doMinMax | ( | AccumType & | vmin,
|  | AccumType & | vmax )

private

scan dataset(s) to find min and max

## _doMinMaxNpts()

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

uInt64 casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::_doMinMaxNpts | ( | AccumType & | vmin,
|  | AccumType & | vmax )

private

## _doNpts()

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

uInt64 casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::_doNpts | ( |  | ) |

private

## _doNptsMinMax()

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

void casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::_doNptsMinMax | ( | uInt64 & | mynpts,
|  | AccumType & | mymin,
|  | AccumType & | mymax,
|  | std::shared_ptr< uInt64 > | knownNpts,
|  | std::shared_ptr< AccumType > | knownMin,
|  | std::shared_ptr< AccumType > | knownMax )

private

for quantile computations, if necessary, determines npts, min, max to send to quantile calculator methods

## _getDoMaxMin()

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

Bool casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::_getDoMaxMin | ( |  | ) | const

inline protected

Definition at line 299 of file ClassicalStatistics.h.

References _doMaxMin.

## _getInitialStats()

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

virtual StatsData< AccumType > casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::_getInitialStats | ( |  | ) | const

protected virtual

Reimplemented in casacore::FitToHalfStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >.

## _getQuantileComputer()

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

std::shared_ptr< StatisticsAlgorithmQuantileComputer< CASA_STATP > > casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::_getQuantileComputer | ( |  | ) |

inline protected

Definition at line 424 of file ClassicalStatistics.h.

References _qComputer.

## _getStatistic()

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

virtual AccumType casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::_getStatistic | ( | StatisticsData::STATS | stat | ) |

protected virtual

Implements casacore::StatisticsAlgorithm< CASA_STATP >.

Reimplemented in casacore::ConstrainedRangeStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >, and casacore::ConstrainedRangeStatistics< CASA_STATP >.

## _getStatistics()

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

virtual StatsData< AccumType > casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::_getStatistics | ( |  | ) |

protected virtual

Implements casacore::StatisticsAlgorithm< CASA_STATP >.

Reimplemented in casacore::BiweightStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >, casacore::ConstrainedRangeStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >, casacore::ConstrainedRangeStatistics< CASA_STATP >, and casacore::FitToHalfStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >.

## _getStatsData() [1/2]

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

virtual StatsData< AccumType > & casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::_getStatsData | ( |  | ) |

inline protected virtual

Retrieve stats structure.

Allows derived classes to maintain their own StatsData structs.

Reimplemented in casacore::FitToHalfStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >.

Definition at line 309 of file ClassicalStatistics.h.

References _statsData.

## _getStatsData() [2/2]

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

virtual const StatsData< AccumType > & casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::_getStatsData | ( |  | ) | const

inline protected virtual

Definition at line 311 of file ClassicalStatistics.h.

References _statsData.

## _minMax() [1/8]

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

virtual void casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::_minMax | ( | std::shared_ptr< AccumType > & | mymin,
|  | std::shared_ptr< AccumType > & | mymax,
|  | const DataIterator & | dataBegin,
|  | const WeightsIterator & | weightBegin,
|  | uInt64 | nr,
|  | uInt | dataStride,
|  | const MaskIterator & | maskBegin,
|  | uInt | maskStride ) const

protected virtual

## _minMax() [2/8]

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

virtual void casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::_minMax | ( | std::shared_ptr< AccumType > & | mymin,
|  | std::shared_ptr< AccumType > & | mymax,
|  | const DataIterator & | dataBegin,
|  | const WeightsIterator & | weightsBegin,
|  | uInt64 | nr,
|  | uInt | dataStride ) const

protected virtual

## _minMax() [3/8]

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

virtual void casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::_minMax | ( | std::shared_ptr< AccumType > & | mymin,
|  | std::shared_ptr< AccumType > & | mymax,
|  | const DataIterator & | dataBegin,
|  | const WeightsIterator & | weightsBegin,
|  | uInt64 | nr,
|  | uInt | dataStride,
|  | const DataRanges & | ranges,
|  | Bool | isInclude ) const

protected virtual

References DataRanges.

## _minMax() [4/8]

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

virtual void casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::_minMax | ( | std::shared_ptr< AccumType > & | mymin,
|  | std::shared_ptr< AccumType > & | mymax,
|  | const DataIterator & | dataBegin,
|  | const WeightsIterator & | weightsBegin,
|  | uInt64 | nr,
|  | uInt | dataStride,
|  | const MaskIterator & | maskBegin,
|  | uInt | maskStride,
|  | const DataRanges & | ranges,
|  | Bool | isInclude ) const

protected virtual

References DataRanges.

## _minMax() [5/8]

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

virtual void casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::_minMax | ( | std::shared_ptr< AccumType > & | mymin,
|  | std::shared_ptr< AccumType > & | mymax,
|  | const DataIterator & | dataBegin,
|  | uInt64 | nr,
|  | uInt | dataStride ) const

protected virtual

Reimplemented in casacore::ConstrainedRangeStatistics< CASA_STATP >.

## _minMax() [6/8]

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

virtual void casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::_minMax | ( | std::shared_ptr< AccumType > & | mymin,
|  | std::shared_ptr< AccumType > & | mymax,
|  | const DataIterator & | dataBegin,
|  | uInt64 | nr,
|  | uInt | dataStride,
|  | const DataRanges & | ranges,
|  | Bool | isInclude ) const

protected virtual

References DataRanges.

## _minMax() [7/8]

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

virtual void casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::_minMax | ( | std::shared_ptr< AccumType > & | mymin,
|  | std::shared_ptr< AccumType > & | mymax,
|  | const DataIterator & | dataBegin,
|  | uInt64 | nr,
|  | uInt | dataStride,
|  | const MaskIterator & | maskBegin,
|  | uInt | maskStride ) const

protected virtual

## _minMax() [8/8]

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

virtual void casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::_minMax | ( | std::shared_ptr< AccumType > & | mymin,
|  | std::shared_ptr< AccumType > & | mymax,
|  | const DataIterator & | dataBegin,
|  | uInt64 | nr,
|  | uInt | dataStride,
|  | const MaskIterator & | maskBegin,
|  | uInt | maskStride,
|  | const DataRanges & | ranges,
|  | Bool | isInclude ) const

protected virtual

References DataRanges.

## _minMaxNpts() [1/8]

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

virtual void casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::_minMaxNpts | ( | uInt64 & | npts,
|  | std::shared_ptr< AccumType > & | mymin,
|  | std::shared_ptr< AccumType > & | mymax,
|  | const DataIterator & | dataBegin,
|  | const WeightsIterator & | weightBegin,
|  | uInt64 | nr,
|  | uInt | dataStride,
|  | const MaskIterator & | maskBegin,
|  | uInt | maskStride ) const

protected virtual

## _minMaxNpts() [2/8]

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

virtual void casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::_minMaxNpts | ( | uInt64 & | npts,
|  | std::shared_ptr< AccumType > & | mymin,
|  | std::shared_ptr< AccumType > & | mymax,
|  | const DataIterator & | dataBegin,
|  | const WeightsIterator & | weightsBegin,
|  | uInt64 | nr,
|  | uInt | dataStride ) const

protected virtual

## _minMaxNpts() [3/8]

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

virtual void casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::_minMaxNpts | ( | uInt64 & | npts,
|  | std::shared_ptr< AccumType > & | mymin,
|  | std::shared_ptr< AccumType > & | mymax,
|  | const DataIterator & | dataBegin,
|  | const WeightsIterator & | weightsBegin,
|  | uInt64 | nr,
|  | uInt | dataStride,
|  | const DataRanges & | ranges,
|  | Bool | isInclude ) const

protected virtual

References DataRanges.

## _minMaxNpts() [4/8]

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

virtual void casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::_minMaxNpts | ( | uInt64 & | npts,
|  | std::shared_ptr< AccumType > & | mymin,
|  | std::shared_ptr< AccumType > & | mymax,
|  | const DataIterator & | dataBegin,
|  | const WeightsIterator & | weightsBegin,
|  | uInt64 | nr,
|  | uInt | dataStride,
|  | const MaskIterator & | maskBegin,
|  | uInt | maskStride,
|  | const DataRanges & | ranges,
|  | Bool | isInclude ) const

protected virtual

References DataRanges.

## _minMaxNpts() [5/8]

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

virtual void casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::_minMaxNpts | ( | uInt64 & | npts,
|  | std::shared_ptr< AccumType > & | mymin,
|  | std::shared_ptr< AccumType > & | mymax,
|  | const DataIterator & | dataBegin,
|  | uInt64 | nr,
|  | uInt | dataStride ) const

protected virtual

Sometimes we want the min, max, and npts all in one scan.

Reimplemented in casacore::ConstrainedRangeStatistics< CASA_STATP >.

## _minMaxNpts() [6/8]

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

virtual void casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::_minMaxNpts | ( | uInt64 & | npts,
|  | std::shared_ptr< AccumType > & | mymin,
|  | std::shared_ptr< AccumType > & | mymax,
|  | const DataIterator & | dataBegin,
|  | uInt64 | nr,
|  | uInt | dataStride,
|  | const DataRanges & | ranges,
|  | Bool | isInclude ) const

protected virtual

References DataRanges.

## _minMaxNpts() [7/8]

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

virtual void casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::_minMaxNpts | ( | uInt64 & | npts,
|  | std::shared_ptr< AccumType > & | mymin,
|  | std::shared_ptr< AccumType > & | mymax,
|  | const DataIterator & | dataBegin,
|  | uInt64 | nr,
|  | uInt | dataStride,
|  | const MaskIterator & | maskBegin,
|  | uInt | maskStride ) const

protected virtual

## _minMaxNpts() [8/8]

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

virtual void casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::_minMaxNpts | ( | uInt64 & | npts,
|  | std::shared_ptr< AccumType > & | mymin,
|  | std::shared_ptr< AccumType > & | mymax,
|  | const DataIterator & | dataBegin,
|  | uInt64 | nr,
|  | uInt | dataStride,
|  | const MaskIterator & | maskBegin,
|  | uInt | maskStride,
|  | const DataRanges & | ranges,
|  | Bool | isInclude ) const

protected virtual

References DataRanges.

## _unweightedStats() [1/4]

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

virtual void casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::_unweightedStats | ( | StatsData< AccumType > & | stats,
|  | uInt64 & | ngood,
|  | LocationType & | location,
|  | const DataIterator & | dataBegin,
|  | uInt64 | nr,
|  | uInt | dataStride )

protected virtual

no weights, no mask, no ranges

Reimplemented in casacore::ConstrainedRangeStatistics< CASA_STATP >.

## _unweightedStats() [2/4]

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

virtual void casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::_unweightedStats | ( | StatsData< AccumType > & | stats,
|  | uInt64 & | ngood,
|  | LocationType & | location,
|  | const DataIterator & | dataBegin,
|  | uInt64 | nr,
|  | uInt | dataStride,
|  | const DataRanges & | ranges,
|  | Bool | isInclude )

protected virtual

no weights, no mask

References DataRanges.

## _unweightedStats() [3/4]

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

virtual void casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::_unweightedStats | ( | StatsData< AccumType > & | stats,
|  | uInt64 & | ngood,
|  | LocationType & | location,
|  | const DataIterator & | dataBegin,
|  | uInt64 | nr,
|  | uInt | dataStride,
|  | const MaskIterator & | maskBegin,
|  | uInt | maskStride )

protected virtual

## _unweightedStats() [4/4]

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

virtual void casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::_unweightedStats | ( | StatsData< AccumType > & | stats,
|  | uInt64 & | ngood,
|  | LocationType & | location,
|  | const DataIterator & | dataBegin,
|  | uInt64 | nr,
|  | uInt | dataStride,
|  | const MaskIterator & | maskBegin,
|  | uInt | maskStride,
|  | const DataRanges & | ranges,
|  | Bool | isInclude )

protected virtual

References DataRanges.

## _updateDataProviderMaxMin()

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

virtual void casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::_updateDataProviderMaxMin | ( | const StatsData< AccumType > & | threadStats | ) |

protected virtual

## _weightedStats() [1/4]

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

virtual void casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::_weightedStats | ( | StatsData< AccumType > & | stats,
|  | LocationType & | location,
|  | const DataIterator & | dataBegin,
|  | const WeightsIterator & | weightBegin,
|  | uInt64 | nr,
|  | uInt | dataStride,
|  | const MaskIterator & | maskBegin,
|  | uInt | maskStride )

protected virtual

## _weightedStats() [2/4]

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

virtual void casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::_weightedStats | ( | StatsData< AccumType > & | stats,
|  | LocationType & | location,
|  | const DataIterator & | dataBegin,
|  | const WeightsIterator & | weightBegin,
|  | uInt64 | nr,
|  | uInt | dataStride,
|  | const MaskIterator & | maskBegin,
|  | uInt | maskStride,
|  | const DataRanges & | ranges,
|  | Bool | isInclude )

protected virtual

References DataRanges.

## _weightedStats() [3/4]

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

virtual void casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::_weightedStats | ( | StatsData< AccumType > & | stats,
|  | LocationType & | location,
|  | const DataIterator & | dataBegin,
|  | const WeightsIterator & | weightsBegin,
|  | uInt64 | nr,
|  | uInt | dataStride )

protected virtual

has weights, but no mask, no ranges

Reimplemented in casacore::ConstrainedRangeStatistics< CASA_STATP >.

## _weightedStats() [4/4]

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

virtual void casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::_weightedStats | ( | StatsData< AccumType > & | stats,
|  | LocationType & | location,
|  | const DataIterator & | dataBegin,
|  | const WeightsIterator & | weightsBegin,
|  | uInt64 | nr,
|  | uInt | dataStride,
|  | const DataRanges & | ranges,
|  | Bool | isInclude )

protected virtual

References DataRanges.

## algorithm()

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

virtual StatisticsData::ALGORITHM casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::algorithm | ( |  | ) | const

inline virtual

get the algorithm that this object uses for computing stats

Implements casacore::StatisticsAlgorithm< CASA_STATP >.

Reimplemented in casacore::BiweightStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >, casacore::ChauvenetCriterionStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >, casacore::FitToHalfStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >, and casacore::HingesFencesStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >.

Definition at line 82 of file ClassicalStatistics.h.

References casacore::StatisticsData::CLASSICAL.

## clone()

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

virtual StatisticsAlgorithm< CASA_STATP > * casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::clone | ( |  | ) | const

virtual

Clone this instance.

Implements casacore::StatisticsAlgorithm< CASA_STATP >.

Reimplemented in casacore::BiweightStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >, casacore::ChauvenetCriterionStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >, casacore::FitToHalfStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >, and casacore::HingesFencesStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >.

References casacore::StatisticsAlgorithm< CASA_STATP >::StatisticsAlgorithm().

## getMedian()

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

virtual AccumType casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::getMedian | ( | std::shared_ptr< uInt64 > | knownNpts = nullptr,
|  | std::shared_ptr< AccumType > | knownMin = nullptr,
|  | std::shared_ptr< AccumType > | knownMax = nullptr,
|  | uInt | binningThreshholdSizeBytes = 4096 *4096,
|  | Bool | persistSortedArray = False,
|  | uInt | nBins = 10000 )

virtual

In the following group of methods, if the size of the composite dataset is smaller than binningThreshholdSizeBytes, the composite dataset will be (perhaps partially) sorted and persisted in memory during the call.

In that case, and if persistSortedArray is True, this sorted array will remain in memory after the call and will be used on subsequent calls of this method when binningThreshholdSizeBytes is greater than the size of the composite dataset. If persistSortedArray is False, the sorted array will not be stored after this call completes and so any subsequent calls for which the dataset size is less than binningThreshholdSizeBytes, the dataset will be sorted from scratch. Values which are not included due to non-unity strides, are not included in any specified ranges, are masked, or have associated weights of zero are not considered as dataset members for quantile computations. If one has a priori information regarding the number of points (npts) and/or the minimum and maximum values of the data set, these can be supplied to improve performance. Note however, that if these values are not correct, the resulting median and/or quantile values will also not be correct (although see the following notes regarding max/min). Note that if this object has already had getStatistics() called, and the min and max were calculated, there is no need to pass these values in as they have been stored internally and used (although passing them in shouldn't hurt anything). If provided, npts, the number of points falling in the specified ranges which are not masked and have weights > 0, should be exactly correct. min can be less than the true minimum, and max can be greater than the True maximum, but for best performance, these should be as close to the actual min and max as possible. In order for quantile computations to occur over multiple datasets, all datasets must be available. This means that if setCalculateAsAdded() was previously called by passing in a value of True, these methods will throw an exception as the previous call indicates that there is no guarantee that all datasets will be available. If one uses a data provider (by having called setDataProvider()), then this should not be an issue.

Get the median of the distribution. For a dataset with an odd number of good points, the median is just the value at index int(N/2) in the equivalent sorted dataset, where N is the number of points. For a dataset with an even number of points, the median is the mean of the values at indices int(N/2)-1 and int(N/2) in the sorted dataset. nBins is the number of bins, per histogram, to use to bin the data. More bins decrease the likelihood that multiple passes of the data set will be necessary, but also increase the amount of memory used. If nBins is set to less than 1,000, it is automatically increased to 1,000; there should be no reason to ever set nBins to be this small.

Reimplemented in casacore::ConstrainedRangeStatistics< CASA_STATP >.

References casacore::False.

## getMedianAbsDevMed()

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

virtual AccumType casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::getMedianAbsDevMed | ( | std::shared_ptr< uInt64 > | knownNpts = nullptr,
|  | std::shared_ptr< AccumType > | knownMin = nullptr,
|  | std::shared_ptr< AccumType > | knownMax = nullptr,
|  | uInt | binningThreshholdSizeBytes = 4096 *4096,
|  | Bool | persistSortedArray = False,
|  | uInt | nBins = 10000 )

virtual

get the median of the absolute deviation about the median of the data.

Reimplemented in casacore::ConstrainedRangeStatistics< CASA_STATP >.

References casacore::False.

## getMedianAndQuantiles()

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

virtual AccumType casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::getMedianAndQuantiles | ( | std::map< Double, AccumType > & | quantiles,
|  | const std::set< Double > & | fractions,
|  | std::shared_ptr< uInt64 > | knownNpts = nullptr,
|  | std::shared_ptr< AccumType > | knownMin = nullptr,
|  | std::shared_ptr< AccumType > | knownMax = nullptr,
|  | uInt | binningThreshholdSizeBytes = 4096 *4096,
|  | Bool | persistSortedArray = False,
|  | uInt | nBins = 10000 )

virtual

If one needs to compute both the median and quantile values, it is better to call getMedianAndQuantiles() rather than getMedian() and getQuantiles() separately, as the first will scan large data sets fewer times than calling the separate methods.

The return value is the median; the quantiles are returned in the quantiles map. Values in the fractions set represent the locations in the CDF and should be between 0 and 1, exclusive.

Reimplemented in casacore::ConstrainedRangeStatistics< CASA_STATP >.

References casacore::False.

## getMinMax()

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

virtual void casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::getMinMax | ( | AccumType & | mymin,
|  | AccumType & | mymax )

virtual

scan the dataset(s) that have been added, and find the min and max.

This method may be called even if setStatsToCaclulate has been called and MAX and MIN has been excluded. If setCalculateAsAdded(True) has previously been called after this object has been (re)initialized, an exception will be thrown. The second version also determines npts in the same scan.

Reimplemented in casacore::ConstrainedRangeStatistics< CASA_STATP >.

## getMinMaxNpts()

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

virtual void casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::getMinMaxNpts | ( | uInt64 & | npts,
|  | AccumType & | mymin,
|  | AccumType & | mymax )

virtual

## getNPts()

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

virtual uInt64 casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::getNPts | ( |  | ) |

virtual

scan the dataset(s) that have been added, and find the number of good points.

This method may be called even if setStatsToCaclulate has been called and NPTS has been excluded. If setCalculateAsAdded(True) has previously been called after this object has been (re)initialized, an exception will be thrown.

Reimplemented in casacore::ConstrainedRangeStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >, casacore::ConstrainedRangeStatistics< CASA_STATP >, and casacore::FitToHalfStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >.

## getQuantiles()

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

virtual std::map< Double, AccumType > casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::getQuantiles | ( | const std::set< Double > & | fractions,
|  | std::shared_ptr< uInt64 > | knownNpts = nullptr,
|  | std::shared_ptr< AccumType > | knownMin = nullptr,
|  | std::shared_ptr< AccumType > | knownMax = nullptr,
|  | uInt | binningThreshholdSizeBytes = 4096 *4096,
|  | Bool | persistSortedArray = False,
|  | uInt | nBins = 10000 )

virtual

Get the specified quantiles.

fractions must be between 0 and 1, noninclusive.

Reimplemented in casacore::ConstrainedRangeStatistics< CASA_STATP >.

References casacore::False.

## getStatisticIndex()

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

virtual std::pair< Int64, Int64 > casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::getStatisticIndex | ( | StatisticsData::STATS | stat | ) |

virtual

see base class description

Implements casacore::StatisticsAlgorithm< CASA_STATP >.

Reimplemented in casacore::BiweightStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >, casacore::ConstrainedRangeStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >, and casacore::ConstrainedRangeStatistics< CASA_STATP >.

## operator=()

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

ClassicalStatistics & casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::operator= | ( | const ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator > & | other | ) |

copy semantics

References ClassicalStatistics().

## reset()

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

virtual void casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::reset | ( |  | ) |

virtual

reset object to initial state.

Clears all private fields including data, accumulators, etc.

Reimplemented from casacore::StatisticsAlgorithm< CASA_STATP >.

Reimplemented in casacore::BiweightStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >, casacore::ChauvenetCriterionStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >, casacore::ConstrainedRangeStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >, casacore::ConstrainedRangeStatistics< CASA_STATP >, casacore::FitToHalfStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >, and casacore::HingesFencesStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >.

## setCalculateAsAdded()

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

virtual void casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::setCalculateAsAdded | ( | Bool | c | ) |

virtual

Should statistics be updated with calls to addData or should they only be calculated upon calls to getStatistics() etc?

Beware that calling this will automatically reinitialize the object, so that it will contain no references to data et al. after this method has been called.

Reimplemented in casacore::BiweightStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >, casacore::ChauvenetCriterionStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >, casacore::FitToHalfStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >, and casacore::HingesFencesStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >.

## setDataProvider()

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

virtual void casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::setDataProvider | ( | StatsDataProvider< CASA_STATP > * | dataProvider | ) |

virtual

An exception will be thrown if setCalculateAsAdded(True) has been called.

Reimplemented from casacore::StatisticsAlgorithm< CASA_STATP >.

## setQuantileComputer()

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

void casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::setQuantileComputer | ( | std::shared_ptr< ClassicalQuantileComputer< CASA_STATP > > | qc | ) |

inline

Allow derived objects to set the quantile computer object.

API developers shouldn't need to call this, unless they are writing derived classes of ClassicalStatistics. Purposefully non-virtual. Derived classes should not implement.

Definition at line 219 of file ClassicalStatistics.h.

References _qComputer.

## setStatsToCalculate()

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

virtual void casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::setStatsToCalculate | ( | std::set< StatisticsData::STATS > & | stats | ) |

virtual

Provide guidance to algorithms by specifying a priori which statistics the caller would like calculated.

Reimplemented from casacore::StatisticsAlgorithm< CASA_STATP >.

Reimplemented in casacore::BiweightStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >, and casacore::FitToHalfStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >.

## Member Data Documentation

## _calculateAsAdded

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

Bool casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::_calculateAsAdded

private

Definition at line 491 of file ClassicalStatistics.h.

## _doMaxMin

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

Bool casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::_doMaxMin

private

Definition at line 491 of file ClassicalStatistics.h.

Referenced by _getDoMaxMin().

## _mustAccumulate

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

Bool casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::_mustAccumulate

private

Definition at line 491 of file ClassicalStatistics.h.

## _qComputer

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

std::shared_ptr<ClassicalQuantileComputer<CASA_STATP> > casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::_qComputer

private

Definition at line 493 of file ClassicalStatistics.h.

Referenced by _getQuantileComputer(), and setQuantileComputer().

## _statsData

template<class AccumType, class DataIterator, class MaskIterator = const Bool*, class WeightsIterator = DataIterator>

StatsData<AccumType> casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::_statsData

private

Definition at line 490 of file ClassicalStatistics.h.

Referenced by _getStatsData(), and _getStatsData().

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

- scimath/StatsFramework/ClassicalStatistics.h