casacore::StatisticsAlgorithm< AccumType, DataIterator, MaskIterator, WeightsIterator > Class Template Reference

Base class of statistics algorithm class hierarchy. More...

#include <StatisticsAlgorithm.h>

Inheritance diagram for casacore::StatisticsAlgorithm< AccumType, DataIterator, MaskIterator, WeightsIterator >:
casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >

List of all members.

Public Member Functions

virtual ~StatisticsAlgorithm ()
virtual 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 void addData (const DataIterator &first, uInt nr, const DataRanges &dataRanges, Bool isInclude=True, uInt dataStride=1, Bool nrAccountsForStride=False)
virtual void addData (const DataIterator &first, const MaskIterator &maskFirst, uInt nr, uInt dataStride=1, Bool nrAccountsForStride=False, uInt maskStride=1)
virtual void addData (const DataIterator &first, const MaskIterator &maskFirst, uInt nr, const DataRanges &dataRanges, Bool isInclude=True, uInt dataStride=1, Bool nrAccountsForStride=False, uInt maskStride=1)
virtual void addData (const DataIterator &first, const WeightsIterator &weightFirst, uInt nr, uInt dataStride=1, Bool nrAccountsForStride=False)
virtual void addData (const DataIterator &first, const WeightsIterator &weightFirst, uInt nr, const DataRanges &dataRanges, Bool isInclude=True, uInt dataStride=1, Bool nrAccountsForStride=False)
virtual void addData (const DataIterator &first, const WeightsIterator &weightFirst, const MaskIterator &maskFirst, uInt nr, uInt dataStride=1, Bool nrAccountsForStride=False, uInt maskStride=1)
virtual void addData (const DataIterator &first, const WeightsIterator &weightFirst, const MaskIterator &maskFirst, uInt nr, const DataRanges &dataRanges, Bool isInclude=True, uInt dataStride=1, Bool nrAccountsForStride=False, uInt maskStride=1)
virtual StatisticsData::ALGORITHM algorithm () const =0
 get the algorithm that this object uses for computing stats
void deleteSortedArray ()
 delete any (partially) sorted array
virtual AccumType getMedian (CountedPtr< uInt64 > knownNpts=NULL, CountedPtr< AccumType > knownMin=NULL, CountedPtr< AccumType > knownMax=NULL, uInt binningThreshholdSizeBytes=4096 *4096, Bool persistSortedArray=False, uInt64 nBins=10000)=0
virtual AccumType getMedianAndQuantiles (std::map< Double, AccumType > &quantileToValue, const std::set< Double > &quantiles, CountedPtr< uInt64 > knownNpts=NULL, CountedPtr< AccumType > knownMin=NULL, CountedPtr< AccumType > knownMax=NULL, uInt binningThreshholdSizeBytes=4096 *4096, Bool persistSortedArray=False, uInt64 nBins=10000)=0
 The return value is the median; the quantiles are returned in the quantileToValue map.
virtual AccumType getMedianAbsDevMed (CountedPtr< uInt64 > knownNpts=NULL, CountedPtr< AccumType > knownMin=NULL, CountedPtr< AccumType > knownMax=NULL, uInt binningThreshholdSizeBytes=4096 *4096, Bool persistSortedArray=False, uInt64 nBins=10000)=0
 get the median of the absolute deviation about the median of the data.
AccumType getQuantile (Double quantile, CountedPtr< uInt64 > knownNpts=NULL, CountedPtr< AccumType > knownMin=NULL, CountedPtr< AccumType > knownMax=NULL, uInt binningThreshholdSizeBytes=4096 *4096, Bool persistSortedArray=False, uInt64 nBins=10000)
virtual std::map< Double,
AccumType > 
getQuantiles (const std::set< Double > &quantiles, CountedPtr< uInt64 > npts=NULL, CountedPtr< AccumType > min=NULL, CountedPtr< AccumType > max=NULL, uInt binningThreshholdSizeBytes=4096 *4096, Bool persistSortedArray=False, uInt64 nBins=10000)=0
 get a map of quantiles to values.
virtual AccumType getStatistic (StatisticsData::STATS stat)
 get the value of the specified statistic
virtual std::pair< Int64, Int64getStatisticIndex (StatisticsData::STATS stat)=0
 certain statistics such as max and min have locations in the dataset associated with them.
virtual StatsData< AccumType > getStatistics ()
virtual 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.
virtual void setData (const DataIterator &first, uInt nr, const DataRanges &dataRanges, Bool isInclude=True, uInt dataStride=1, Bool nrAccountsForStride=False)
virtual void setData (const DataIterator &first, const MaskIterator &maskFirst, uInt nr, uInt dataStride=1, Bool nrAccountsForStride=False, uInt maskStride=1)
virtual void setData (const DataIterator &first, const MaskIterator &maskFirst, uInt nr, const DataRanges &dataRanges, Bool isInclude=True, uInt dataStride=1, Bool nrAccountsForStride=False, uInt maskStride=1)
virtual void setData (const DataIterator &first, const WeightsIterator &weightFirst, uInt nr, uInt dataStride=1, Bool nrAccountsForStride=False)
virtual void setData (const DataIterator &first, const WeightsIterator &weightFirst, uInt nr, const DataRanges &dataRanges, Bool isInclude=True, uInt dataStride=1, Bool nrAccountsForStride=False)
virtual void setData (const DataIterator &first, const WeightsIterator &weightFirst, const MaskIterator &maskFirst, uInt nr, uInt dataStride=1, Bool nrAccountsForStride=False, uInt maskStride=1)
virtual void setData (const DataIterator &first, const WeightsIterator &weightFirst, const MaskIterator &maskFirst, uInt nr, const DataRanges &dataRanges, Bool isInclude=True, uInt dataStride=1, Bool nrAccountsForStride=False, uInt maskStride=1)
virtual void setDataProvider (StatsDataProvider< CASA_STATP > *dataProvider)
 instead of settng and adding data "by hand", set the data provider that will provide all the data sets.
virtual void setStatsToCalculate (std::set< StatisticsData::STATS > &stats)
 Provide guidance to algorithms by specifying a priori which statistics the caller would like calculated.

Protected Member Functions

 StatisticsAlgorithm ()
StatisticsAlgorithm< CASA_STATP > & operator= (const StatisticsAlgorithm< CASA_STATP > &other)
 use copy semantics
virtual void _addData ()
 Allows derived classes to do things after data is set or added.
virtual void _clearData ()
const vector< Int64 > & _getCounts () const
const vector< DataIterator > & _getData () const
StatsDataProvider< CASA_STATP > * _getDataProvider ()
const vector< uInt > & _getDataStrides () const
const std::map< uInt, Bool > & _getIsIncludeRanges () const
const std::map< uInt,
MaskIterator > 
_getMasks () const
const std::map< uInt, uInt > & _getMaskStrides () const
const std::map< uInt,
DataRanges > & 
_getRanges () const
virtual AccumType _getStatistic (StatisticsData::STATS stat)=0
virtual StatsData< AccumType > _getStatistics ()=0
const std::set
< StatisticsData::STATS
_getStatsToCalculate () const
std::vector< AccumType > & _getSortedArray ()
virtual const std::set
< StatisticsData::STATS > & 
_getUnsupportedStatistics () const
const std::map< uInt,
WeightsIterator > & 
_getWeights () const
void _setSortedArray (const vector< AccumType > &v)

Static Protected Member Functions

static std::map< Double, uInt64_indicesFromQuantiles (uInt64 npts, const std::set< Double > &quantiles)
*static std::map< uInt64,
AccumType > 
_valuesFromArray (vector< AccumType > &myArray, const std::set< uInt64 > &indices)
 The array can be changed by paritally sorting it up to the largest index.

Private Member Functions

void _throwIfDataProviderDefined () const

Private Attributes

vector< DataIterator > _data
std::map< uInt, WeightsIterator > _weights
 maps data to weights
std::map< uInt, MaskIterator > _masks
 maps data to masks
vector< Int64_counts
vector< uInt_dataStrides
std::map< uInt, uInt_maskStrides
std::map< uInt, Bool_isIncludeRanges
std::map< uInt, DataRanges > _dataRanges
vector< AccumType > _sortedArray
std::set< StatisticsData::STATS_statsToCalculate
std::set< StatisticsData::STATS_unsupportedStats
StatsDataProvider< CASA_STATP > * _dataProvider

Detailed Description

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

Base class of statistics algorithm class hierarchy.

The default implementation is such that statistics are only calculated when getStatistic() or getStatistics() is called. Until then, the iterators which point to the beginning of data sets, masks, etc. are held in memory. Thus, the caller must keep all data sets available for the statistics object until these methods are called, and of course, if the actual data values are changed between adding data and calculating statistics, the updated values are used when calculating statistics. Derived classes may override this behavior.

PRECISION CONSIDERATIONS Many statistics are computed via accumulators. This can lead to precision issues, especially for large datasets. For this reason, it is highly recommended that the data type one uses as the AccumType be of higher precision, if possible, than the data type pointed to by input iterator. So for example, if one has a data set of Float values (to which the InputIterator type points to), then one should use type Double for the AccumType. In this case, the Float data values will be converted to Doubles before they are accumulated.

METHODS OF PROVIDING DATA Data may be provided in one of two mutually exclusive ways. The first way is simpler, and that is to use the setData()/addData() methods. Calling setData() will clear any previous data that was added via these methods or via a data provider (see below). Calling addData() subsequently to setData() will add a data set to the set of data sets on which statistics will be calculated. In order for this to work correctly, the iterators which are passed into these methods must still be valid when statistics are calculated (although note that some derived classes allow certain statistics to be updated as data sets are added via these methods. See specific classes for details).

The second way to provide data is via a data provider. This takes the form of a derived class of StatsDataProvider, in which various methods are implemented for retrieving various information about the data sets. Such an interface is necessary for data which does not easily lend itself to be provided via the setData()/addData() methods. For example, in the case of iterating through a lattice, a lattice iterator will overwrite the memory location of the previous chunk of data with the current chunk of data. Therefore, if one does not wish to load data from the entire lattice into memory (which is why LatticeIterator was designed in this way), one must the LatticeStatsDataProvider class, which the statistics framework will use to iteratate through the lattice, only keeping one chunk of the data of the lattice in memory at one time.

QUANTILES A quantile is a value contained in a data set, such that, it has a zero-based index of ceil(q*n)-1 in the equivalent ordered dataset, where 0 < q < 1 specifies the fractional location within the ordered dataset and n is the total number of elements. Note that, for a dataset with an odd number of elements, the median is the same as the quantile value when q = 0.5. However, there is no such correspondance between the median in a dataset with an even number of elements, since the median in that case is given by the mean of the elements of zero-based indeces n/2-1 and n/2 in the equivalent ordered dataset. Thus, in the case of a dataset with an even number of values, the median may not even exist in the dataset, while a quantile value must exist in the dataset. Note when calculating quantile values, a dataset that does not fall in specified dataset ranges, is not included via a stride specification, is masked, or has a weight of zero is not considered a member of the dataset for the pruposes of quantile calculations.

Definition at line 105 of file StatisticsAlgorithm.h.


Constructor & Destructor Documentation

template<class AccumType, class DataIterator, class MaskIterator = const Bool *, class WeightsIterator = DataIterator>
virtual casacore::StatisticsAlgorithm< AccumType, DataIterator, MaskIterator, WeightsIterator >::~StatisticsAlgorithm (  )  [virtual]
template<class AccumType, class DataIterator, class MaskIterator = const Bool *, class WeightsIterator = DataIterator>
casacore::StatisticsAlgorithm< AccumType, DataIterator, MaskIterator, WeightsIterator >::StatisticsAlgorithm (  )  [protected]

Member Function Documentation

template<class AccumType, class DataIterator, class MaskIterator = const Bool *, class WeightsIterator = DataIterator>
virtual void casacore::StatisticsAlgorithm< AccumType, DataIterator, MaskIterator, WeightsIterator >::_addData (  )  [inline, protected, virtual]

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

Default implementation does nothing.

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

Definition at line 308 of file StatisticsAlgorithm.h.

template<class AccumType, class DataIterator, class MaskIterator = const Bool *, class WeightsIterator = DataIterator>
virtual void casacore::StatisticsAlgorithm< AccumType, DataIterator, MaskIterator, WeightsIterator >::_clearData (  )  [protected, virtual]
template<class AccumType, class DataIterator, class MaskIterator = const Bool *, class WeightsIterator = DataIterator>
const vector<Int64>& casacore::StatisticsAlgorithm< AccumType, DataIterator, MaskIterator, WeightsIterator >::_getCounts (  )  const [inline, protected]

Definition at line 312 of file StatisticsAlgorithm.h.

template<class AccumType, class DataIterator, class MaskIterator = const Bool *, class WeightsIterator = DataIterator>
const vector<DataIterator>& casacore::StatisticsAlgorithm< AccumType, DataIterator, MaskIterator, WeightsIterator >::_getData (  )  const [inline, protected]

Definition at line 314 of file StatisticsAlgorithm.h.

template<class AccumType, class DataIterator, class MaskIterator = const Bool *, class WeightsIterator = DataIterator>
StatsDataProvider<CASA_STATP>* casacore::StatisticsAlgorithm< AccumType, DataIterator, MaskIterator, WeightsIterator >::_getDataProvider (  )  [inline, protected]

Definition at line 316 of file StatisticsAlgorithm.h.

template<class AccumType, class DataIterator, class MaskIterator = const Bool *, class WeightsIterator = DataIterator>
const vector<uInt>& casacore::StatisticsAlgorithm< AccumType, DataIterator, MaskIterator, WeightsIterator >::_getDataStrides (  )  const [inline, protected]

Definition at line 320 of file StatisticsAlgorithm.h.

template<class AccumType, class DataIterator, class MaskIterator = const Bool *, class WeightsIterator = DataIterator>
const std::map<uInt, Bool>& casacore::StatisticsAlgorithm< AccumType, DataIterator, MaskIterator, WeightsIterator >::_getIsIncludeRanges (  )  const [inline, protected]

Definition at line 322 of file StatisticsAlgorithm.h.

template<class AccumType, class DataIterator, class MaskIterator = const Bool *, class WeightsIterator = DataIterator>
const std::map<uInt, MaskIterator> casacore::StatisticsAlgorithm< AccumType, DataIterator, MaskIterator, WeightsIterator >::_getMasks (  )  const [inline, protected]

Definition at line 324 of file StatisticsAlgorithm.h.

template<class AccumType, class DataIterator, class MaskIterator = const Bool *, class WeightsIterator = DataIterator>
const std::map<uInt, uInt>& casacore::StatisticsAlgorithm< AccumType, DataIterator, MaskIterator, WeightsIterator >::_getMaskStrides (  )  const [inline, protected]

Definition at line 326 of file StatisticsAlgorithm.h.

template<class AccumType, class DataIterator, class MaskIterator = const Bool *, class WeightsIterator = DataIterator>
const std::map<uInt, DataRanges>& casacore::StatisticsAlgorithm< AccumType, DataIterator, MaskIterator, WeightsIterator >::_getRanges (  )  const [inline, protected]

Definition at line 328 of file StatisticsAlgorithm.h.

template<class AccumType, class DataIterator, class MaskIterator = const Bool *, class WeightsIterator = DataIterator>
std::vector<AccumType>& casacore::StatisticsAlgorithm< AccumType, DataIterator, MaskIterator, WeightsIterator >::_getSortedArray (  )  [inline, protected]

Definition at line 338 of file StatisticsAlgorithm.h.

template<class AccumType, class DataIterator, class MaskIterator = const Bool *, class WeightsIterator = DataIterator>
virtual AccumType casacore::StatisticsAlgorithm< AccumType, DataIterator, MaskIterator, WeightsIterator >::_getStatistic ( StatisticsData::STATS  stat  )  [protected, pure virtual]
template<class AccumType, class DataIterator, class MaskIterator = const Bool *, class WeightsIterator = DataIterator>
virtual StatsData<AccumType> casacore::StatisticsAlgorithm< AccumType, DataIterator, MaskIterator, WeightsIterator >::_getStatistics (  )  [protected, pure virtual]
template<class AccumType, class DataIterator, class MaskIterator = const Bool *, class WeightsIterator = DataIterator>
const std::set<StatisticsData::STATS> casacore::StatisticsAlgorithm< AccumType, DataIterator, MaskIterator, WeightsIterator >::_getStatsToCalculate (  )  const [inline, protected]

Definition at line 334 of file StatisticsAlgorithm.h.

template<class AccumType, class DataIterator, class MaskIterator = const Bool *, class WeightsIterator = DataIterator>
virtual const std::set<StatisticsData::STATS>& casacore::StatisticsAlgorithm< AccumType, DataIterator, MaskIterator, WeightsIterator >::_getUnsupportedStatistics (  )  const [inline, protected, virtual]

Definition at line 340 of file StatisticsAlgorithm.h.

template<class AccumType, class DataIterator, class MaskIterator = const Bool *, class WeightsIterator = DataIterator>
const std::map<uInt, WeightsIterator>& casacore::StatisticsAlgorithm< AccumType, DataIterator, MaskIterator, WeightsIterator >::_getWeights (  )  const [inline, protected]

Definition at line 344 of file StatisticsAlgorithm.h.

template<class AccumType, class DataIterator, class MaskIterator = const Bool *, class WeightsIterator = DataIterator>
static std::map<Double, uInt64> casacore::StatisticsAlgorithm< AccumType, DataIterator, MaskIterator, WeightsIterator >::_indicesFromQuantiles ( uInt64  npts,
const std::set< Double > &  quantiles 
) [static, protected]
template<class AccumType, class DataIterator, class MaskIterator = const Bool *, class WeightsIterator = DataIterator>
void casacore::StatisticsAlgorithm< AccumType, DataIterator, MaskIterator, WeightsIterator >::_setSortedArray ( const vector< AccumType > &  v  )  [inline, protected]

Definition at line 362 of file StatisticsAlgorithm.h.

template<class AccumType, class DataIterator, class MaskIterator = const Bool *, class WeightsIterator = DataIterator>
void casacore::StatisticsAlgorithm< AccumType, DataIterator, MaskIterator, WeightsIterator >::_throwIfDataProviderDefined (  )  const [private]
template<class AccumType, class DataIterator, class MaskIterator = const Bool *, class WeightsIterator = DataIterator>
* static std::map<uInt64, AccumType> casacore::StatisticsAlgorithm< AccumType, DataIterator, MaskIterator, WeightsIterator >::_valuesFromArray ( vector< AccumType > &  myArray,
const std::set< uInt64 > &  indices 
) [static, protected]

The array can be changed by paritally sorting it up to the largest index.

Return a map of index to value in the sorted array.

template<class AccumType, class DataIterator, class MaskIterator = const Bool *, class WeightsIterator = DataIterator>
virtual void casacore::StatisticsAlgorithm< AccumType, DataIterator, MaskIterator, WeightsIterator >::addData ( const DataIterator &  first,
const WeightsIterator &  weightFirst,
const MaskIterator &  maskFirst,
uInt  nr,
const DataRanges &  dataRanges,
Bool  isInclude = True,
uInt  dataStride = 1,
Bool  nrAccountsForStride = False,
uInt  maskStride = 1 
) [virtual]
template<class AccumType, class DataIterator, class MaskIterator = const Bool *, class WeightsIterator = DataIterator>
virtual void casacore::StatisticsAlgorithm< AccumType, DataIterator, MaskIterator, WeightsIterator >::addData ( const DataIterator &  first,
const WeightsIterator &  weightFirst,
const MaskIterator &  maskFirst,
uInt  nr,
uInt  dataStride = 1,
Bool  nrAccountsForStride = False,
uInt  maskStride = 1 
) [virtual]
template<class AccumType, class DataIterator, class MaskIterator = const Bool *, class WeightsIterator = DataIterator>
virtual void casacore::StatisticsAlgorithm< AccumType, DataIterator, MaskIterator, WeightsIterator >::addData ( const DataIterator &  first,
const WeightsIterator &  weightFirst,
uInt  nr,
const DataRanges &  dataRanges,
Bool  isInclude = True,
uInt  dataStride = 1,
Bool  nrAccountsForStride = False 
) [virtual]
template<class AccumType, class DataIterator, class MaskIterator = const Bool *, class WeightsIterator = DataIterator>
virtual void casacore::StatisticsAlgorithm< AccumType, DataIterator, MaskIterator, WeightsIterator >::addData ( const DataIterator &  first,
const WeightsIterator &  weightFirst,
uInt  nr,
uInt  dataStride = 1,
Bool  nrAccountsForStride = False 
) [virtual]
template<class AccumType, class DataIterator, class MaskIterator = const Bool *, class WeightsIterator = DataIterator>
virtual void casacore::StatisticsAlgorithm< AccumType, DataIterator, MaskIterator, WeightsIterator >::addData ( const DataIterator &  first,
const MaskIterator &  maskFirst,
uInt  nr,
const DataRanges &  dataRanges,
Bool  isInclude = True,
uInt  dataStride = 1,
Bool  nrAccountsForStride = False,
uInt  maskStride = 1 
) [virtual]
template<class AccumType, class DataIterator, class MaskIterator = const Bool *, class WeightsIterator = DataIterator>
virtual void casacore::StatisticsAlgorithm< AccumType, DataIterator, MaskIterator, WeightsIterator >::addData ( const DataIterator &  first,
const MaskIterator &  maskFirst,
uInt  nr,
uInt  dataStride = 1,
Bool  nrAccountsForStride = False,
uInt  maskStride = 1 
) [virtual]
template<class AccumType, class DataIterator, class MaskIterator = const Bool *, class WeightsIterator = DataIterator>
virtual void casacore::StatisticsAlgorithm< AccumType, DataIterator, MaskIterator, WeightsIterator >::addData ( const DataIterator &  first,
uInt  nr,
const DataRanges &  dataRanges,
Bool  isInclude = True,
uInt  dataStride = 1,
Bool  nrAccountsForStride = False 
) [virtual]
template<class AccumType, class DataIterator, class MaskIterator = const Bool *, class WeightsIterator = DataIterator>
virtual void casacore::StatisticsAlgorithm< AccumType, DataIterator, MaskIterator, WeightsIterator >::addData ( const DataIterator &  first,
uInt  nr,
uInt  dataStride = 1,
Bool  nrAccountsForStride = False 
) [virtual]

Add a dataset to an existing set of datasets on which statistics are to be calculated.

nr is the number of points to be considered. If dataStride is greater than 1, when nrAccountsForStride=True indicates that the stride has been taken into account in the value of nr. Otherwise, it has not so that the actual number of points to include is nr/dataStride if nr % dataStride == 0 or (int)(nr/dataStride) + 1 otherwise. If one calls this method after a data provider has been set, an exception will be thrown. In this case, one should call setData(), rather than addData(), to indicate that the underlying data provider should be removed. dataRanges provide the ranges of data to include if isInclude is True, or ranges of data to exclude if isInclude is False. If a datum equals the end point of a data range, it is considered good (included) if isInclude is True, and it is considered bad (excluded) if isInclude is False.

template<class AccumType, class DataIterator, class MaskIterator = const Bool *, class WeightsIterator = DataIterator>
virtual StatisticsData::ALGORITHM casacore::StatisticsAlgorithm< AccumType, DataIterator, MaskIterator, WeightsIterator >::algorithm (  )  const [pure virtual]
template<class AccumType, class DataIterator, class MaskIterator = const Bool *, class WeightsIterator = DataIterator>
void casacore::StatisticsAlgorithm< AccumType, DataIterator, MaskIterator, WeightsIterator >::deleteSortedArray (  ) 

delete any (partially) sorted array

template<class AccumType, class DataIterator, class MaskIterator = const Bool *, class WeightsIterator = DataIterator>
virtual AccumType casacore::StatisticsAlgorithm< AccumType, DataIterator, MaskIterator, WeightsIterator >::getMedian ( CountedPtr< uInt64 knownNpts = NULL,
CountedPtr< AccumType >  knownMin = NULL,
CountedPtr< AccumType >  knownMax = NULL,
uInt  binningThreshholdSizeBytes = 4096 *4096,
Bool  persistSortedArray = False,
uInt64  nBins = 10000 
) [pure virtual]
template<class AccumType, class DataIterator, class MaskIterator = const Bool *, class WeightsIterator = DataIterator>
virtual AccumType casacore::StatisticsAlgorithm< AccumType, DataIterator, MaskIterator, WeightsIterator >::getMedianAbsDevMed ( CountedPtr< uInt64 knownNpts = NULL,
CountedPtr< AccumType >  knownMin = NULL,
CountedPtr< AccumType >  knownMax = NULL,
uInt  binningThreshholdSizeBytes = 4096 *4096,
Bool  persistSortedArray = False,
uInt64  nBins = 10000 
) [pure virtual]
template<class AccumType, class DataIterator, class MaskIterator = const Bool *, class WeightsIterator = DataIterator>
virtual AccumType casacore::StatisticsAlgorithm< AccumType, DataIterator, MaskIterator, WeightsIterator >::getMedianAndQuantiles ( std::map< Double, AccumType > &  quantileToValue,
const std::set< Double > &  quantiles,
CountedPtr< uInt64 knownNpts = NULL,
CountedPtr< AccumType >  knownMin = NULL,
CountedPtr< AccumType >  knownMax = NULL,
uInt  binningThreshholdSizeBytes = 4096 *4096,
Bool  persistSortedArray = False,
uInt64  nBins = 10000 
) [pure virtual]
template<class AccumType, class DataIterator, class MaskIterator = const Bool *, class WeightsIterator = DataIterator>
AccumType casacore::StatisticsAlgorithm< AccumType, DataIterator, MaskIterator, WeightsIterator >::getQuantile ( Double  quantile,
CountedPtr< uInt64 knownNpts = NULL,
CountedPtr< AccumType >  knownMin = NULL,
CountedPtr< AccumType >  knownMax = NULL,
uInt  binningThreshholdSizeBytes = 4096 *4096,
Bool  persistSortedArray = False,
uInt64  nBins = 10000 
)
template<class AccumType, class DataIterator, class MaskIterator = const Bool *, class WeightsIterator = DataIterator>
virtual std::map<Double, AccumType> casacore::StatisticsAlgorithm< AccumType, DataIterator, MaskIterator, WeightsIterator >::getQuantiles ( const std::set< Double > &  quantiles,
CountedPtr< uInt64 npts = NULL,
CountedPtr< AccumType >  min = NULL,
CountedPtr< AccumType >  max = NULL,
uInt  binningThreshholdSizeBytes = 4096 *4096,
Bool  persistSortedArray = False,
uInt64  nBins = 10000 
) [pure virtual]
template<class AccumType, class DataIterator, class MaskIterator = const Bool *, class WeightsIterator = DataIterator>
virtual AccumType casacore::StatisticsAlgorithm< AccumType, DataIterator, MaskIterator, WeightsIterator >::getStatistic ( StatisticsData::STATS  stat  )  [virtual]

get the value of the specified statistic

template<class AccumType, class DataIterator, class MaskIterator = const Bool *, class WeightsIterator = DataIterator>
virtual std::pair<Int64, Int64> casacore::StatisticsAlgorithm< AccumType, DataIterator, MaskIterator, WeightsIterator >::getStatisticIndex ( StatisticsData::STATS  stat  )  [pure virtual]

certain statistics such as max and min have locations in the dataset associated with them.

This method gets those locations. The first value in the returned pair is the zero-based dataset number that was set or added. The second value is the zero-based index in that dataset. A data stride of greater than one is not accounted for, so the index represents the actual location in the data set, independent of the dataStride value.

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

template<class AccumType, class DataIterator, class MaskIterator = const Bool *, class WeightsIterator = DataIterator>
virtual StatsData<AccumType> casacore::StatisticsAlgorithm< AccumType, DataIterator, MaskIterator, WeightsIterator >::getStatistics (  )  [virtual]
template<class AccumType, class DataIterator, class MaskIterator = const Bool *, class WeightsIterator = DataIterator>
StatisticsAlgorithm<CASA_STATP>& casacore::StatisticsAlgorithm< AccumType, DataIterator, MaskIterator, WeightsIterator >::operator= ( const StatisticsAlgorithm< CASA_STATP > &  other  )  [protected]
template<class AccumType, class DataIterator, class MaskIterator = const Bool *, class WeightsIterator = DataIterator>
virtual void casacore::StatisticsAlgorithm< AccumType, DataIterator, MaskIterator, WeightsIterator >::setData ( const DataIterator &  first,
const WeightsIterator &  weightFirst,
const MaskIterator &  maskFirst,
uInt  nr,
const DataRanges &  dataRanges,
Bool  isInclude = True,
uInt  dataStride = 1,
Bool  nrAccountsForStride = False,
uInt  maskStride = 1 
) [virtual]
template<class AccumType, class DataIterator, class MaskIterator = const Bool *, class WeightsIterator = DataIterator>
virtual void casacore::StatisticsAlgorithm< AccumType, DataIterator, MaskIterator, WeightsIterator >::setData ( const DataIterator &  first,
const WeightsIterator &  weightFirst,
const MaskIterator &  maskFirst,
uInt  nr,
uInt  dataStride = 1,
Bool  nrAccountsForStride = False,
uInt  maskStride = 1 
) [virtual]
template<class AccumType, class DataIterator, class MaskIterator = const Bool *, class WeightsIterator = DataIterator>
virtual void casacore::StatisticsAlgorithm< AccumType, DataIterator, MaskIterator, WeightsIterator >::setData ( const DataIterator &  first,
const WeightsIterator &  weightFirst,
uInt  nr,
const DataRanges &  dataRanges,
Bool  isInclude = True,
uInt  dataStride = 1,
Bool  nrAccountsForStride = False 
) [virtual]
template<class AccumType, class DataIterator, class MaskIterator = const Bool *, class WeightsIterator = DataIterator>
virtual void casacore::StatisticsAlgorithm< AccumType, DataIterator, MaskIterator, WeightsIterator >::setData ( const DataIterator &  first,
const WeightsIterator &  weightFirst,
uInt  nr,
uInt  dataStride = 1,
Bool  nrAccountsForStride = False 
) [virtual]
template<class AccumType, class DataIterator, class MaskIterator = const Bool *, class WeightsIterator = DataIterator>
virtual void casacore::StatisticsAlgorithm< AccumType, DataIterator, MaskIterator, WeightsIterator >::setData ( const DataIterator &  first,
const MaskIterator &  maskFirst,
uInt  nr,
const DataRanges &  dataRanges,
Bool  isInclude = True,
uInt  dataStride = 1,
Bool  nrAccountsForStride = False,
uInt  maskStride = 1 
) [virtual]
template<class AccumType, class DataIterator, class MaskIterator = const Bool *, class WeightsIterator = DataIterator>
virtual void casacore::StatisticsAlgorithm< AccumType, DataIterator, MaskIterator, WeightsIterator >::setData ( const DataIterator &  first,
const MaskIterator &  maskFirst,
uInt  nr,
uInt  dataStride = 1,
Bool  nrAccountsForStride = False,
uInt  maskStride = 1 
) [virtual]
template<class AccumType, class DataIterator, class MaskIterator = const Bool *, class WeightsIterator = DataIterator>
virtual void casacore::StatisticsAlgorithm< AccumType, DataIterator, MaskIterator, WeightsIterator >::setData ( const DataIterator &  first,
uInt  nr,
const DataRanges &  dataRanges,
Bool  isInclude = True,
uInt  dataStride = 1,
Bool  nrAccountsForStride = False 
) [virtual]
template<class AccumType, class DataIterator, class MaskIterator = const Bool *, class WeightsIterator = DataIterator>
virtual void casacore::StatisticsAlgorithm< AccumType, DataIterator, MaskIterator, WeightsIterator >::setData ( const DataIterator &  first,
uInt  nr,
uInt  dataStride = 1,
Bool  nrAccountsForStride = False 
) [virtual]

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.

See addData() for parameter meanings.

template<class AccumType, class DataIterator, class MaskIterator = const Bool *, class WeightsIterator = DataIterator>
virtual void casacore::StatisticsAlgorithm< AccumType, DataIterator, MaskIterator, WeightsIterator >::setDataProvider ( StatsDataProvider< CASA_STATP > *  dataProvider  )  [inline, virtual]

instead of settng and adding data "by hand", set the data provider that will provide all the data sets.

Calling this method will clear any other data sets that have previously been set or added.

Definition at line 288 of file StatisticsAlgorithm.h.

template<class AccumType, class DataIterator, class MaskIterator = const Bool *, class WeightsIterator = DataIterator>
virtual void casacore::StatisticsAlgorithm< 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 in casacore::ClassicalStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >, and casacore::ClassicalStatistics< CASA_STATP >.


Member Data Documentation

template<class AccumType, class DataIterator, class MaskIterator = const Bool *, class WeightsIterator = DataIterator>
vector<Int64> casacore::StatisticsAlgorithm< AccumType, DataIterator, MaskIterator, WeightsIterator >::_counts [private]
template<class AccumType, class DataIterator, class MaskIterator = const Bool *, class WeightsIterator = DataIterator>
vector<DataIterator> casacore::StatisticsAlgorithm< AccumType, DataIterator, MaskIterator, WeightsIterator >::_data [private]
template<class AccumType, class DataIterator, class MaskIterator = const Bool *, class WeightsIterator = DataIterator>
StatsDataProvider<CASA_STATP>* casacore::StatisticsAlgorithm< AccumType, DataIterator, MaskIterator, WeightsIterator >::_dataProvider [private]
template<class AccumType, class DataIterator, class MaskIterator = const Bool *, class WeightsIterator = DataIterator>
std::map<uInt, DataRanges> casacore::StatisticsAlgorithm< AccumType, DataIterator, MaskIterator, WeightsIterator >::_dataRanges [private]
template<class AccumType, class DataIterator, class MaskIterator = const Bool *, class WeightsIterator = DataIterator>
vector<uInt> casacore::StatisticsAlgorithm< AccumType, DataIterator, MaskIterator, WeightsIterator >::_dataStrides [private]
template<class AccumType, class DataIterator, class MaskIterator = const Bool *, class WeightsIterator = DataIterator>
std::map<uInt, Bool> casacore::StatisticsAlgorithm< AccumType, DataIterator, MaskIterator, WeightsIterator >::_isIncludeRanges [private]
template<class AccumType, class DataIterator, class MaskIterator = const Bool *, class WeightsIterator = DataIterator>
std::map<uInt, MaskIterator> casacore::StatisticsAlgorithm< AccumType, DataIterator, MaskIterator, WeightsIterator >::_masks [private]
template<class AccumType, class DataIterator, class MaskIterator = const Bool *, class WeightsIterator = DataIterator>
std::map<uInt, uInt> casacore::StatisticsAlgorithm< AccumType, DataIterator, MaskIterator, WeightsIterator >::_maskStrides [private]
template<class AccumType, class DataIterator, class MaskIterator = const Bool *, class WeightsIterator = DataIterator>
vector<AccumType> casacore::StatisticsAlgorithm< AccumType, DataIterator, MaskIterator, WeightsIterator >::_sortedArray [private]
template<class AccumType, class DataIterator, class MaskIterator = const Bool *, class WeightsIterator = DataIterator>
std::set<StatisticsData::STATS> casacore::StatisticsAlgorithm< AccumType, DataIterator, MaskIterator, WeightsIterator >::_statsToCalculate [private]
template<class AccumType, class DataIterator, class MaskIterator = const Bool *, class WeightsIterator = DataIterator>
std::set<StatisticsData::STATS> casacore::StatisticsAlgorithm< AccumType, DataIterator, MaskIterator, WeightsIterator >::_unsupportedStats [private]
template<class AccumType, class DataIterator, class MaskIterator = const Bool *, class WeightsIterator = DataIterator>
std::map<uInt, WeightsIterator> casacore::StatisticsAlgorithm< AccumType, DataIterator, MaskIterator, WeightsIterator >::_weights [private]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1