casacore
Classes | Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
casacore::StatisticsAlgorithmFactory< AccumType, DataIterator, MaskIterator, WeightsIterator > Class Template Reference

Allows a common way for configuring and creating stats algorithm objects. More...

#include <StatisticsAlgorithmFactory.h>

Classes

struct  ChauvenetData
 
struct  FitToHalfData
 

Public Member Functions

 StatisticsAlgorithmFactory ()
 upon construction, the object is configured to use the classical stats algorithm More...
 
 ~StatisticsAlgorithmFactory ()
 
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. More...
 
void configureHingesFences (Double f)
 configure to use hinges-fences algorithm More...
 
void configureChauvenet (Double zscore=-1, Int maxIterations=-1)
 configure to use Chauvenet's criterion More...
 
CountedPtr< StatisticsAlgorithm< CASA_STATP > > createStatsAlgorithm () const
 Create a pointer to an object of a class derived from StatisticsAlgorithm that reflects the current configuration. More...
 
StatisticsData::ALGORITHM algorithm () const
 
ChauvenetData chauvenetData () const
 Throws an exception if the current configuration is not relevant to the Chauvenet/zscore algorithm. More...
 
Double hingesFencesFactor () const
 Throws an exception if the current configuration is not relevant to the hinges-fences algorithm. More...
 
FitToHalfData fitToHalfData () const
 Throws an exception if the current configuration is not relevant to the fit-to-half algorithm. More...
 
Record toRecord () const
 create a record from the current configuration that can be used to create another object using the fromRecord() method. More...
 

Static Public Member Functions

static StatisticsAlgorithmFactory< CASA_STATPfromRecord (const Record &r)
 create an object from a record More...
 

Private Attributes

StatisticsData::ALGORITHM _algorithm
 
Double _hf
 hinges-fences f factor More...
 
FitToHalfData _fitToHalfData
 
ChauvenetData _chauvData
 

Detailed Description

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

Allows a common way for configuring and creating stats algorithm objects.

Definition at line 40 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 81 of file StatisticsAlgorithmFactory.h.

◆ chauvenetData()

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

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

Referenced by casacore::StatisticsAlgorithmFactory< AccumType, const T *, const Bool *>::algorithm().

◆ 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.

◆ 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

◆ createStatsAlgorithm()

template<class AccumType, class DataIterator, class MaskIterator = const Bool *, class WeightsIterator = DataIterator>
CountedPtr<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>
FitToHalfData casacore::StatisticsAlgorithmFactory< AccumType, DataIterator, MaskIterator, WeightsIterator >::fitToHalfData ( ) const

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

Referenced by casacore::StatisticsAlgorithmFactory< AccumType, const T *, const Bool *>::algorithm().

◆ fromRecord()

template<class AccumType, class DataIterator, class MaskIterator = const Bool *, class WeightsIterator = DataIterator>
static StatisticsAlgorithmFactory<CASA_STATP> casacore::StatisticsAlgorithmFactory< AccumType, DataIterator, MaskIterator, WeightsIterator >::fromRecord ( const Record r)
static

◆ 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.

Referenced by casacore::StatisticsAlgorithmFactory< AccumType, const T *, const Bool *>::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.

Referenced by casacore::StatisticsAlgorithmFactory< AccumType, const T *, const Bool *>::algorithm().

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

◆ _chauvData

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

Definition at line 108 of file StatisticsAlgorithmFactory.h.

◆ _fitToHalfData

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

Definition at line 107 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 106 of file StatisticsAlgorithmFactory.h.


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