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

Provides a single interface for creation of stats algorithm objects. More...

`#include <StatisticsAlgorithmFactory.h>`

## Public Member Functions

| StatisticsAlgorithmFactory ()
| upon construction, the object is configured to use the classical stats algorithm
| ~StatisticsAlgorithmFactory ()
void | configureBiweight (Int maxIter=3, Double c=6.0)
void | configureClassical ()
void | configureFitToHalf (FitToHalfStatisticsData::CENTER centerType=FitToHalfStatisticsData::CMEAN, FitToHalfStatisticsData::USE_DATA useData=FitToHalfStatisticsData::LE_CENTER, AccumType centerValue=0)
| configure to use fit to half algorithm.
void | configureHingesFences (Double f)
| configure to use hinges-fences algorithm
void | configureChauvenet (Double zscore=-1, Int maxIterations=-1)
| configure to use Chauvenet's criterion
template<class DataIterator2, class MaskIterator2, class WeightsIterator2>
void | copy (StatisticsAlgorithmFactory< AccumType, DataIterator2, MaskIterator2, WeightsIterator2 > &other) const
| copy the data from this object to an object with different template types.
std::shared_ptr< StatisticsAlgorithm< CASA_STATP > > | createStatsAlgorithm () const
| Create a pointer to an object of a class derived from StatisticsAlgorithm that reflects the current configuration.
StatisticsData::ALGORITHM | algorithm () const
StatisticsAlgorithmFactoryData::BiweightData | biweightData () const
| Throws an exception if the current configuration is not relevant to the Biweight algorithm.
StatisticsAlgorithmFactoryData::ChauvenetData | chauvenetData () const
| Throws an exception if the current configuration is not relevant to the Chauvenet/zscore algorithm.
Double | hingesFencesFactor () const
| Throws an exception if the current configuration is not relevant to the hinges-fences algorithm.
StatisticsAlgorithmFactoryData::FitToHalfData< AccumType > | fitToHalfData () const
| Throws an exception if the current configuration is not relevant to the fit-to-half algorithm.
Record | toRecord () const
| create a record from the current configuration that can be used to create another object using the fromRecord() method.

## Static Public Member Functions

static StatisticsAlgorithmFactory< CASA_STATP > | fromRecord (const Record &r)
| create an object from a record

## Private Attributes

StatisticsData::ALGORITHM | _algorithm
Double | _hf
| hinges-fences f factor
StatisticsAlgorithmFactoryData::BiweightData | _biweightData
StatisticsAlgorithmFactoryData::FitToHalfData< AccumType > | _fitToHalfData
StatisticsAlgorithmFactoryData::ChauvenetData | _chauvData

## Friends

template<class AccumType2, class DataIterator2, class MaskIterator2, class WeightsIterator2>
class | StatisticsAlgorithmFactory
| to make copy() more straight forward to implement

## Detailed Description

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

Provides a single interface for creation of stats algorithm objects.

Definition at line 42 of file StatisticsAlgorithmFactory.h.

## Constructor & Destructor Documentation

## StatisticsAlgorithmFactory()

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

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

upon construction, the object is configured to use the classical stats algorithm

## ~StatisticsAlgorithmFactory()

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

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

## Member Function Documentation

## algorithm()

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

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

inline

Definition at line 91 of file StatisticsAlgorithmFactory.h.

References _algorithm.

## biweightData()

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

StatisticsAlgorithmFactoryData::BiweightData casacore::StatisticsAlgorithmFactory< AccumType, DataIterator, MaskIterator, WeightsIterator >::biweightData | ( |  | ) | const

Throws an exception if the current configuration is not relevant to the Biweight algorithm.

## chauvenetData()

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

StatisticsAlgorithmFactoryData::ChauvenetData casacore::StatisticsAlgorithmFactory< AccumType, DataIterator, MaskIterator, WeightsIterator >::chauvenetData | ( |  | ) | const

Throws an exception if the current configuration is not relevant to the Chauvenet/zscore algorithm.

## configureBiweight()

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

void casacore::StatisticsAlgorithmFactory< AccumType, DataIterator, MaskIterator, WeightsIterator >::configureBiweight | ( | Int | maxIter = 3,
|  | Double | c = 6.0 )

## configureChauvenet()

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

void casacore::StatisticsAlgorithmFactory< AccumType, DataIterator, MaskIterator, WeightsIterator >::configureChauvenet | ( | Double | zscore = -1,
|  | Int | maxIterations = -1 )

configure to use Chauvenet's criterion

## configureClassical()

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

void casacore::StatisticsAlgorithmFactory< AccumType, DataIterator, MaskIterator, WeightsIterator >::configureClassical | ( |  | ) |

## configureFitToHalf()

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

void casacore::StatisticsAlgorithmFactory< AccumType, DataIterator, MaskIterator, WeightsIterator >::configureFitToHalf | ( | FitToHalfStatisticsData::CENTER | centerType = FitToHalfStatisticsData::CMEAN,
|  | FitToHalfStatisticsData::USE_DATA | useData = FitToHalfStatisticsData::LE_CENTER,
|  | AccumType | centerValue = 0 )

configure to use fit to half algorithm.

References casacore::FitToHalfStatisticsData::CMEAN, and casacore::FitToHalfStatisticsData::LE_CENTER.

## configureHingesFences()

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

void casacore::StatisticsAlgorithmFactory< AccumType, DataIterator, MaskIterator, WeightsIterator >::configureHingesFences | ( | Double | f | ) |

configure to use hinges-fences algorithm

## copy()

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

void casacore::StatisticsAlgorithmFactory< AccumType, DataIterator, MaskIterator, WeightsIterator >::copy | ( | StatisticsAlgorithmFactory< AccumType, DataIterator2, MaskIterator2, WeightsIterator2 > & | other | ) | const

copy the data from this object to an object with different template types.

Note that the AccumType of other must be the same as the AccumType of this object.

References StatisticsAlgorithmFactory.

## createStatsAlgorithm()

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

std::shared_ptr< StatisticsAlgorithm< CASA_STATP > > casacore::StatisticsAlgorithmFactory< AccumType, DataIterator, MaskIterator, WeightsIterator >::createStatsAlgorithm | ( |  | ) | const

Create a pointer to an object of a class derived from StatisticsAlgorithm that reflects the current configuration.

## fitToHalfData()

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

StatisticsAlgorithmFactoryData::FitToHalfData< AccumType > casacore::StatisticsAlgorithmFactory< AccumType, DataIterator, MaskIterator, WeightsIterator >::fitToHalfData | ( |  | ) | const

Throws an exception if the current configuration is not relevant to the fit-to-half algorithm.

## fromRecord()

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

StatisticsAlgorithmFactory< CASA_STATP > casacore::StatisticsAlgorithmFactory< AccumType, DataIterator, MaskIterator, WeightsIterator >::fromRecord | ( | const Record & | r | ) |

static

create an object from a record

References casacore::Record(), and StatisticsAlgorithmFactory.

## hingesFencesFactor()

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

Double casacore::StatisticsAlgorithmFactory< AccumType, DataIterator, MaskIterator, WeightsIterator >::hingesFencesFactor | ( |  | ) | const

Throws an exception if the current configuration is not relevant to the hinges-fences algorithm.

## toRecord()

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

Record casacore::StatisticsAlgorithmFactory< AccumType, DataIterator, MaskIterator, WeightsIterator >::toRecord | ( |  | ) | const

create a record from the current configuration that can be used to create another object using the fromRecord() method.

References casacore::Record().

## Friends And Related Symbol Documentation

## StatisticsAlgorithmFactory

template<class AccumType, class DataIterator, class MaskIterator = const Bool *, class WeightsIterator = DataIterator>
template<class AccumType2, class DataIterator2, class MaskIterator2, class WeightsIterator2>

friend class StatisticsAlgorithmFactory

friend

to make copy() more straight forward to implement

Definition at line 51 of file StatisticsAlgorithmFactory.h.

References StatisticsAlgorithmFactory.

Referenced by copy(), fromRecord(), and StatisticsAlgorithmFactory.

## Member Data Documentation

## _algorithm

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

StatisticsData::ALGORITHM casacore::StatisticsAlgorithmFactory< AccumType, DataIterator, MaskIterator, WeightsIterator >::_algorithm

private

Definition at line 119 of file StatisticsAlgorithmFactory.h.

Referenced by algorithm().

## _biweightData

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

StatisticsAlgorithmFactoryData::BiweightData casacore::StatisticsAlgorithmFactory< AccumType, DataIterator, MaskIterator, WeightsIterator >::_biweightData

private

Definition at line 122 of file StatisticsAlgorithmFactory.h.

## _chauvData

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

StatisticsAlgorithmFactoryData::ChauvenetData casacore::StatisticsAlgorithmFactory< AccumType, DataIterator, MaskIterator, WeightsIterator >::_chauvData

private

Definition at line 124 of file StatisticsAlgorithmFactory.h.

## _fitToHalfData

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

StatisticsAlgorithmFactoryData::FitToHalfData<AccumType> casacore::StatisticsAlgorithmFactory< AccumType, DataIterator, MaskIterator, WeightsIterator >::_fitToHalfData

private

Definition at line 123 of file StatisticsAlgorithmFactory.h.

## _hf

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

Double casacore::StatisticsAlgorithmFactory< AccumType, DataIterator, MaskIterator, WeightsIterator >::_hf

private

hinges-fences f factor

Definition at line 121 of file StatisticsAlgorithmFactory.h.

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

- scimath/StatsFramework/StatisticsAlgorithmFactory.h