26 #ifndef SCIMATH_STATISTICSDATASET_H
27 #define SCIMATH_STATISTICSDATASET_H
50 class AccumType,
class DataIterator,
class MaskIterator=
const Bool *,
51 class WeightsIterator=DataIterator
117 const DataIterator&
first,
const MaskIterator& maskFirst,
uInt nr,
122 const DataIterator&
first,
const MaskIterator& maskFirst,
uInt nr,
128 const DataIterator&
first,
const WeightsIterator& weightFirst,
133 const DataIterator&
first,
const WeightsIterator& weightFirst,
139 const DataIterator&
first,
const WeightsIterator& weightFirst,
140 const MaskIterator& maskFirst,
uInt nr,
uInt dataStride=1,
145 const DataIterator&
first,
const WeightsIterator& weightFirst,
146 const MaskIterator& maskFirst,
uInt nr,
const DataRanges& dataRanges,
171 DataIterator& dataIter, MaskIterator& maskIter,
172 WeightsIterator& weightsIter,
uInt64& offset,
uInt nthreads
181 Bool& chunkHasMask,
uInt& chunkMaskStride,
Bool& chunkHasWeights
186 DataIterator& chunkData,
uInt64& chunkCount,
uInt& chunkStride,
188 Bool& chunkIsIncludeRanges,
Bool& chunkHasMask, MaskIterator& chunkMask,
189 uInt& chunkMaskStride,
Bool& chunkHasWeights,
190 WeightsIterator& chunkWeights
197 std::unique_ptr<DataIterator[]>& dataIter, std::unique_ptr<MaskIterator[]>& maskIter,
198 std::unique_ptr<WeightsIterator[]>& weightsIter, std::unique_ptr<
uInt64[]>& offset,
222 const DataIterator&
first,
const MaskIterator& maskFirst,
uInt nr,
227 const DataIterator&
first,
const MaskIterator& maskFirst,
233 const DataIterator&
first,
const WeightsIterator& weightFirst,
238 const DataIterator&
first,
const WeightsIterator& weightFirst,
244 const DataIterator&
first,
const WeightsIterator& weightFirst,
245 const MaskIterator& maskFirst,
uInt nr,
uInt dataStride=1,
250 const DataIterator&
first,
const WeightsIterator& weightFirst,
251 const MaskIterator& maskFirst,
uInt nr,
const DataRanges& dataRanges,
278 typename std::vector<DataIterator>::const_iterator
_dend{},
_diter{};
279 std::vector<Int64>::const_iterator
_citer{};
289 #ifndef CASACORE_NO_AUTO_TEMPLATES
290 #include <casacore/scimath/StatsFramework/StatisticsDataset.tcc>
void initThreadVars(uInt &nBlocks, uInt64 &extra, uInt &nthreads, std::unique_ptr< DataIterator[]> &dataIter, std::unique_ptr< MaskIterator[]> &maskIter, std::unique_ptr< WeightsIterator[]> &weightsIter, std::unique_ptr< uInt64[]> &offset, uInt nThreadsMax) const
std::vector< DataIterator > _data
std::vector< DataIterator >::const_iterator _dend
const ChunkData & initLoopVars()
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size)
std::vector< DataIterator >::const_iterator _diter
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.
const std::vector< Int64 > & getCounts() const
get data counts associated with the underlying data sets
Representation of a statistics dataset used in statistics framework calculatations.
const StatsDataProvider< CASA_STATP > * getDataProvider() const
StatisticsDataset< CASA_STATP > & operator=(const StatisticsDataset< CASA_STATP > &other)
use copy semantics, except for the data provider which uses reference semantics
void incrementThreadIters(DataIterator &dataIter, MaskIterator &maskIter, WeightsIterator &weightsIter, uInt64 &offset, uInt nthreads) const
PtrHolder< WeightsIterator > weights
associated weights.
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 fi...
unsigned long long uInt64
PtrHolder(const PtrHolder< T > &other)
std::map< uInt, DataRanges > _dataRanges
std::vector< uInt > _dataStrides
Hold and delete pointers not deleted by object destructors.
std::vector< Int64 > _counts
Bool empty() const
returns ! dataProvider && _data.empty()
std::map< uInt, MaskIterator > _masks
maps data to masks
holds information about a data chunk.
PtrHolder< std::pair< MaskIterator, uInt > > mask
associated mask.
bool Bool
Define the standard types used by Casacore.
StatsDataProvider< CASA_STATP > * _dataProvider
std::map< uInt, uInt > _maskStrides
uInt64 count
total number of points
std::map< uInt, WeightsIterator > _weights
maps data to weights.
void _throwIfDataProviderDefined() const
std::vector< uInt >::const_iterator _dsiter
void setDataProvider(StatsDataProvider< CASA_STATP > *dataProvider)
instead of setting and adding data "by hand", set the data provider that will provide all the data se...
DataIterator data
start of data
uInt dataStride
data stride
std::vector< Int64 >::const_iterator _citer
Bool increment(Bool includeIDataset)
std::map< uInt, Bool > _isIncludeRanges
PtrHolder< std::pair< DataRanges, Bool > > ranges
associated ranges.
StatsDataProvider< CASA_STATP > * getDataProvider()