Loading...
Searching...
No Matches
casacore::LatticeStatsDataProviderBase< T > Class Template Referenceabstract

Abstract base class of data providers which allows stats framework to iterate through a lattice. More...

`#include <LatticeStatsDataProviderBase.h>`

## Public Member Functions

virtual | ~LatticeStatsDataProviderBase ()
virtual uInt | estimatedSteps () const =0
| estimated number of steps to iterate through the the lattice
virtual void | finalize ()
| Take any actions necessary to finalize the provider.
uInt | getMaskStride ()
| Get the stride for the current mask (only called if hasMask() returns True).
std::vector< std::pair< typename NumericTraits< T >::PrecisionType, typename NumericTraits< T >::PrecisionType > > | getRanges ()
| Get the associated range(s) of the current dataset.
uInt | getStride ()
| Get the stride for the current data set.
const T * | getWeights ()
| Returns NULL; lattices do not have associated weights.
Bool | hasRanges () const
| Does the current data set have associated range(s)?
Bool | hasWeights () const
| returns False; lattices do not have associated weights.
Bool | isInclude () const
| If the associated data set has ranges, are these include (return True) or exclude (return False) ranges?
void | minMaxPos (IPosition &minpos, IPosition &maxpos) const
| get the positions of the min and max
virtual void | reset ()
| reset the provider to point to the beginning of the first data set it manages.
void | setProgressMeter (std::shared_ptr< LattStatsProgress > pm)
void | setRanges (const std::vector< std::pair< typename NumericTraits< T >::PrecisionType, typename NumericTraits< T >::PrecisionType > > &ranges, Bool isInclude)
| set the data ranges
Public Member Functions inherited from casacore::StatsDataProvider< NumericTraits< T >::PrecisionType, const T *, const Bool * >
virtual | ~StatsDataProvider ()
virtual void | operator++ ()=0
| increment the data provider to the next dataset, mask, range set, and weights.
virtual Bool | atEnd () const=0
| Are there any data sets left to provide?
virtual uInt64 | getCount ()=0
| get the count of elements in the current data set.
virtual const T * | getData ()=0
| get an iterator to the first element of the current dataset
virtual const Bool * | getMask ()=0
| Get an iterator to the first element of the mask for the current dataset.
virtual uInt | getNMaxThreads () const
| If OpenMP is enabled and statistics methods are being called in a multi-threaded context, get maximum number of threads that should be used.
virtual Bool | hasMask () const=0
| Does the current data set have an associated mask?
virtual void | updateMaxPos (const LocationType &)
| In general, unless you are writing statistics algorithm code, you shouldn't need to call these methods.
virtual void | updateMinPos (const LocationType &)

## Protected Member Functions

| LatticeStatsDataProviderBase ()
void | _updateMaxPos (const IPosition &maxPos)
void | _updateMinPos (const IPosition &minPos)
void | _updateProgress ()
Protected Member Functions inherited from casacore::StatsDataProvider< NumericTraits< T >::PrecisionType, const T *, const Bool * >
| StatsDataProvider ()

## Private Attributes

Bool | _hasRanges
Bool | _isInclude
std::vector< std::pair< typename NumericTraits< T >::PrecisionType, typename NumericTraits< T >::PrecisionType > > | _ranges
std::shared_ptr< LattStatsProgress > | _progressMeter
IPosition | _minPos
IPosition | _maxPos

## Detailed Description

template<class T>
class casacore::LatticeStatsDataProviderBase< T >

Abstract base class of data providers which allows stats framework to iterate through a lattice.

Definition at line 42 of file LatticeStatsDataProviderBase.h.

## Constructor & Destructor Documentation

## ~LatticeStatsDataProviderBase()

template<class T>

virtual casacore::LatticeStatsDataProviderBase< T >::~LatticeStatsDataProviderBase | ( |  | ) |

virtual

## LatticeStatsDataProviderBase()

template<class T>

casacore::LatticeStatsDataProviderBase< T >::LatticeStatsDataProviderBase | ( |  | ) |

protected

## Member Function Documentation

## _updateMaxPos()

template<class T>

void casacore::LatticeStatsDataProviderBase< T >::_updateMaxPos | ( | const IPosition & | maxPos | ) |

inline protected

Definition at line 92 of file LatticeStatsDataProviderBase.h.

References _maxPos.

## _updateMinPos()

template<class T>

void casacore::LatticeStatsDataProviderBase< T >::_updateMinPos | ( | const IPosition & | minPos | ) |

inline protected

Definition at line 94 of file LatticeStatsDataProviderBase.h.

References _minPos.

## _updateProgress()

template<class T>

void casacore::LatticeStatsDataProviderBase< T >::_updateProgress | ( |  | ) |

protected

## estimatedSteps()

template<class T>

virtual uInt casacore::LatticeStatsDataProviderBase< T >::estimatedSteps | ( |  | ) | const

pure virtual

estimated number of steps to iterate through the the lattice

Implemented in casacore::LatticeStatsDataProvider< T >, and casacore::MaskedLatticeStatsDataProvider< T >.

## finalize()

template<class T>

virtual void casacore::LatticeStatsDataProviderBase< T >::finalize | ( |  | ) |

virtual

Take any actions necessary to finalize the provider.

This will be called when atEnd() returns True.

Implements casacore::StatsDataProvider< NumericTraits< T >::PrecisionType, const T *, const Bool * >.

Reimplemented in casacore::LatticeStatsDataProvider< T >, and casacore::MaskedLatticeStatsDataProvider< T >.

## getMaskStride()

template<class T>

uInt casacore::LatticeStatsDataProviderBase< T >::getMaskStride | ( |  | ) |

virtual

Get the stride for the current mask (only called if hasMask() returns True).

Implements casacore::StatsDataProvider< NumericTraits< T >::PrecisionType, const T *, const Bool * >.

## getRanges()

template<class T>

std::vector< std::pair< typename NumericTraits< T >::PrecisionType, typename NumericTraits< T >::PrecisionType > > casacore::LatticeStatsDataProviderBase< T >::getRanges | ( |  | ) |

virtual

Get the associated range(s) of the current dataset.

Only called if hasRanges() returns True;

Implements casacore::StatsDataProvider< NumericTraits< T >::PrecisionType, const T *, const Bool * >.

## getStride()

template<class T>

uInt casacore::LatticeStatsDataProviderBase< T >::getStride | ( |  | ) |

virtual

Get the stride for the current data set.

Implements casacore::StatsDataProvider< NumericTraits< T >::PrecisionType, const T *, const Bool * >.

## getWeights()

template<class T>

const T * casacore::LatticeStatsDataProviderBase< T >::getWeights | ( |  | ) |

virtual

Returns NULL; lattices do not have associated weights.

Implements casacore::StatsDataProvider< NumericTraits< T >::PrecisionType, const T *, const Bool * >.

## hasRanges()

template<class T>

Bool casacore::LatticeStatsDataProviderBase< T >::hasRanges | ( |  | ) | const

virtual

Does the current data set have associated range(s)?

Implements casacore::StatsDataProvider< NumericTraits< T >::PrecisionType, const T *, const Bool * >.

## hasWeights()

template<class T>

Bool casacore::LatticeStatsDataProviderBase< T >::hasWeights | ( |  | ) | const

virtual

returns False; lattices do not have associated weights.

Implements casacore::StatsDataProvider< NumericTraits< T >::PrecisionType, const T *, const Bool * >.

## isInclude()

template<class T>

Bool casacore::LatticeStatsDataProviderBase< T >::isInclude | ( |  | ) | const

virtual

If the associated data set has ranges, are these include (return True) or exclude (return False) ranges?

Implements casacore::StatsDataProvider< NumericTraits< T >::PrecisionType, const T *, const Bool * >.

Referenced by setRanges().

## minMaxPos()

template<class T>

void casacore::LatticeStatsDataProviderBase< T >::minMaxPos | ( | IPosition & | minpos,
|  | IPosition & | maxpos ) const

get the positions of the min and max

## reset()

template<class T>

virtual void casacore::LatticeStatsDataProviderBase< T >::reset | ( |  | ) |

virtual

reset the provider to point to the beginning of the first data set it manages.

Implements casacore::StatsDataProvider< NumericTraits< T >::PrecisionType, const T *, const Bool * >.

Reimplemented in casacore::LatticeStatsDataProvider< T >, and casacore::MaskedLatticeStatsDataProvider< T >.

## setProgressMeter()

template<class T>

void casacore::LatticeStatsDataProviderBase< T >::setProgressMeter | ( | std::shared_ptr< LattStatsProgress > | pm | ) |

## setRanges()

template<class T>

void casacore::LatticeStatsDataProviderBase< T >::setRanges | ( | const std::vector< std::pair< typename NumericTraits< T >::PrecisionType, typename NumericTraits< T >::PrecisionType > > & | ranges,
|  | Bool | isInclude )

set the data ranges

References isInclude().

## Member Data Documentation

## _hasRanges

template<class T>

Bool casacore::LatticeStatsDataProviderBase< T >::_hasRanges

private

Definition at line 99 of file LatticeStatsDataProviderBase.h.

## _isInclude

template<class T>

Bool casacore::LatticeStatsDataProviderBase< T >::_isInclude

private

Definition at line 99 of file LatticeStatsDataProviderBase.h.

## _maxPos

template<class T>

IPosition casacore::LatticeStatsDataProviderBase< T >::_maxPos

private

Definition at line 102 of file LatticeStatsDataProviderBase.h.

Referenced by _updateMaxPos().

## _minPos

template<class T>

IPosition casacore::LatticeStatsDataProviderBase< T >::_minPos

private

Definition at line 102 of file LatticeStatsDataProviderBase.h.

Referenced by _updateMinPos().

## _progressMeter

template<class T>

std::shared_ptr<LattStatsProgress> casacore::LatticeStatsDataProviderBase< T >::_progressMeter

private

Definition at line 101 of file LatticeStatsDataProviderBase.h.

## _ranges

template<class T>

std::vector<std::pair<typename NumericTraits<T>::PrecisionType, typename NumericTraits<T>::PrecisionType> > casacore::LatticeStatsDataProviderBase< T >::_ranges

private

Definition at line 100 of file LatticeStatsDataProviderBase.h.

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

- lattices/LatticeMath/LatticeStatsDataProviderBase.h