casacore
Loading...
Searching...
No Matches
BiweightStatistics.h
Go to the documentation of this file.
1// # Copyright (C) 2000,2001
2// # Associated Universities, Inc. Washington DC, USA.
3// #
4// # This library is free software; you can redistribute it and/or modify it
5// # under the terms of the GNU Library General Public License as published by
6// # the Free Software Foundation; either version 2 of the License, or (at your
7// # option) any later version.
8// #
9// # This library is distributed in the hope that it will be useful, but WITHOUT
10// # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11// # FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12// # License for more details.
13// #
14// # You should have received a copy of the GNU Library General Public License
15// # along with this library; if not, write to the Free Software Foundation,
16// # Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
17// #
18// # Correspondence concerning AIPS++ should be addressed as follows:
19// # Internet email: casa-feedback@nrao.edu.
20// # Postal address: AIPS++ Project Office
21// # National Radio Astronomy Observatory
22// # 520 Edgemont Road
23// # Charlottesville, VA 22903-2475 USA
24// #
25
26#ifndef SCIMATH_BIWEIGHTSTATISTICS_H
27#define SCIMATH_BIWEIGHTSTATISTICS_H
28
29#include <casacore/casa/aips.h>
30
31#include <casacore/scimath/StatsFramework/ClassicalStatistics.h>
32
33#include <set>
34#include <vector>
35#include <utility>
36
37namespace casacore {
38
39// The biweight algorithm is a robust iterative algorithm that computes two
40// quantities called the "location" and the "scale", which are analogous to
41// the mean and the standard deviation. Important equations are
42//
43// A. How to compute u_i values, which are related to the weights,
44// w_i = (1 - u_i*u_i) if abs(u_i) < 1, 0 otherwise, using the equation
45//
46// u_i = (x_i - c_bi)/(c*s_bi) (1)
47//
48// where x_i are the data values, c_bi is the biweight location, c is a
49// configurable constant, and s_bi is the biweight scale. For the initial
50// computation of the u_i values, c_bi is set equal to the median of the
51// distribution and s_bi is set equal to the normalized median of the
52// absolute deviation about the median (that is the median of the absolute
53// deviation about the median multiplied by the value of the probit function
54// at 0.75).
55// B The location, c_bi, is computed from
56//
57// c_bi = sum(x_i * w_i^2)/sum(w_i^2) (2)
58//
59// where only values of u_i which satisfy abs(u_i) < 1 (w_i > 0) are used in
60// the sums.
61// C. The scale value is computed using
62//
63// n * sum((x_i - c_bi)^2 * w_i^4)
64// s_bi^2 = _______________________________ (3)
65// p * max(1, p - 1)
66//
67// where n is the number of points for the entire distribution (which includes
68// all the data for which abs(u_i) >= 1) and p is given by
69//
70// p = abs(sum((w_i) * (w_i - 4*u_i^2)))
71//
72// Again, the sums include only data for which abs(u_i) < 1.
73//
74// The algorithm proceeds as follows.
75// 1. Compute initial u_i values from equation (1), setting c_bi equal to the
76// median of the distribution and s_bi equal to the normalized median of the
77// absolute deviation about the median.
78// 2. Compute the initial value of the scale using the u_i values computed in
79// step 1. using equation 3.
80// 3. Recompute u_i values using the most recent previous scale and location
81// values.
82// 4. Compute the location using the u_i values from step 3 and equation (2).
83// 5. Recompute u_i values using the most recent previous scale and location
84// values.
85// 6. Compute the new scale value using the the u_i values computed in step 5
86// and the value of the location computed in step 4.
87// 7. Steps 3. - 6. are repeated until convergence occurs or the maximum number
88// of iterations (a configurable parameter) is reached. The convergence
89// criterion is given by
90//
91// abs(1 - s_bi/s_bi,prev) < 0.03 * sqrt(0.5/(n - 1))
92//
93// where s_bi,prev is the value of the scale computed in the previous
94// iteration.
95//
96// SPECIAL CASE TO FACILITATE SPEED
97//
98// In the special case where maxNiter is specified to be negative, the algorithm
99// proceeds as follows
100// 1. Compute u_i values using the median for the location and the normalized
101// median of the absolute deviation about the median as the scale
102// 2. Compute the location and scale (which can be carried out simultaneously)
103// using the u_i values computed in step 1. The value of the location is just
104// the median that is used in equation (3) to compute the scale
105//
106// IMPORTANT NOTE REGARDING USER SPECIFIED WEIGHTS
107//
108// Although user-specified weights can be supplied, they are effectively ignored
109// by this algorithm, except for data which have weights of zero, which are
110// ignored.
111
112// This is a derived class of ClassicalStatistics, rather than
113// ConstrainedRangeStatistics, because if behaves differently from
114// ConstrainedRangeStatistics and does not need to use any methods in that
115// class, so making it a specialization of the higher level ClassicalStatistics
116// seems the better choice.
117template <class AccumType, class DataIterator, class MaskIterator = const Bool*,
118 class WeightsIterator = DataIterator>
119class BiweightStatistics : public ClassicalStatistics<CASA_STATP> {
120 public:
121 BiweightStatistics(Int maxNiter = 3, Double c = 6.0);
122
123 // copy semantics
125
127
128 // copy semantics
130
132
133 // Clone this instance
135
136 // <group>
137 // these statistics are not supported. The methods, which override
138 // the virtual ancestor versions, throw exceptions.
139 virtual AccumType getMedian(std::shared_ptr<uInt64> knownNpts = nullptr,
140 std::shared_ptr<AccumType> knownMin = nullptr,
141 std::shared_ptr<AccumType> knownMax = nullptr,
142 uInt binningThreshholdSizeBytes = 4096 * 4096,
143 Bool persistSortedArray = False, uInt nBins = 10000);
144
145 virtual AccumType getMedianAndQuantiles(std::map<Double, AccumType>& quantileToValue,
146 const std::set<Double>& quantiles,
147 std::shared_ptr<uInt64> knownNpts = nullptr,
148 std::shared_ptr<AccumType> knownMin = nullptr,
149 std::shared_ptr<AccumType> knownMax = nullptr,
150 uInt binningThreshholdSizeBytes = 4096 * 4096,
151 Bool persistSortedArray = False, uInt nBins = 10000);
152
153 virtual AccumType getMedianAbsDevMed(std::shared_ptr<uInt64> knownNpts = nullptr,
154 std::shared_ptr<AccumType> knownMin = nullptr,
155 std::shared_ptr<AccumType> knownMax = nullptr,
156 uInt binningThreshholdSizeBytes = 4096 * 4096,
157 Bool persistSortedArray = False, uInt nBins = 10000);
158
159 virtual std::map<Double, AccumType> getQuantiles(const std::set<Double>& quantiles,
160 std::shared_ptr<uInt64> npts = nullptr,
161 std::shared_ptr<AccumType> min = nullptr,
162 std::shared_ptr<AccumType> max = nullptr,
163 uInt binningThreshholdSizeBytes = 4096 * 4096,
164 Bool persistSortedArray = False,
165 uInt nBins = 10000);
166
167 virtual std::pair<Int64, Int64> getStatisticIndex(StatisticsData::STATS stat);
168 // </group>
169
170 // returns the number of iterations performed to
171 // compute the current location and scale values
172 Int getNiter() const;
173
174 // reset object to initial state. Clears all private fields including data,
175 // accumulators, etc.
176 virtual void reset();
177
178 // If c is True, an exception is thrown; this algorithm does not support
179 // computing stats as data are added.
180 virtual void setCalculateAsAdded(Bool c);
181
182 // Provide guidance to algorithms by specifying a priori which statistics
183 // the caller would like calculated. This algorithm always needs to compute
184 // the location (MEAN) and the scale (STDDEV) so these statistics are always
185 // added to the input set, which is why this method overrides the base class
186 // version.
187 virtual void setStatsToCalculate(std::set<StatisticsData::STATS>& stats);
188
189 protected:
191
193
194 private:
197 AccumType _location{0}, _scale{0};
198 std::pair<AccumType, AccumType> _range{};
199 // _npts is the number of points computed using ClassicalStatistics
201
202 // because the compiler gets confused if these aren't explicitly typed
203 static const AccumType FOUR;
204 static const AccumType FIVE;
205
206 void _computeLocationAndScaleSums(AccumType& sxw2, AccumType& sw2, AccumType& sx_M2w4,
207 AccumType& ww_4u2, DataIterator dataIter, MaskIterator maskIter,
208 WeightsIterator weightsIter, uInt64 dataCount,
209 const typename StatisticsDataset<CASA_STATP>::ChunkData& chunk);
210
211 void _computeLocationSums(AccumType& sxw2, AccumType& sw2, DataIterator dataIter,
212 MaskIterator maskIter, WeightsIterator weightsIter, uInt64 dataCount,
213 const typename StatisticsDataset<CASA_STATP>::ChunkData& chunk);
214
215 void _computeScaleSums(AccumType& sx_M2w4, AccumType& ww_4u2, DataIterator dataIter,
216 MaskIterator maskIter, WeightsIterator weightsIter, uInt64 dataCount,
217 const typename StatisticsDataset<CASA_STATP>::ChunkData& chunk) const;
218
220
222
223 void _doScale();
224
225 // <group>
226 // sxw2 = sum(x_i*(1 - u_i^2)^2)
227 // sw2 = sum((1-u_i^2)^2)
228 // sx_M2w4 = sum((x_i - _location)^2 * (1 - u_i^2)^4) = sum((x_i - _location)^2 * w_i^4)
229 // ww_4u2 = sum((1 - u_i^2) * (1 - 5*u_i^2)) = sum(w_i * (w_i - 4*u_i^2))
230 void _locationAndScaleSums(AccumType& sxw2, AccumType& sw2, AccumType& sx_M2w4, AccumType& ww_4u2,
231 const DataIterator& dataBegin, uInt64 nr, uInt dataStride) const;
232
233 void _locationAndScaleSums(AccumType& sxw2, AccumType& sw2, AccumType& sx_M2w4, AccumType& ww_4u2,
234 const DataIterator& dataBegin, uInt64 nr, uInt dataStride,
235 const DataRanges& ranges, Bool isInclude) const;
236
237 void _locationAndScaleSums(AccumType& sxw2, AccumType& sw2, AccumType& sx_M2w4, AccumType& ww_4u2,
238 const DataIterator& dataBegin, uInt64 nr, uInt dataStride,
239 const MaskIterator& maskBegin, uInt maskStride) const;
240
241 void _locationAndScaleSums(AccumType& sxw2, AccumType& sw2, AccumType& sx_M2w4, AccumType& ww_4u2,
242 const DataIterator& dataBegin, uInt64 nr, uInt dataStride,
243 const MaskIterator& maskBegin, uInt maskStride,
244 const DataRanges& ranges, Bool isInclude) const;
245
246 void _locationAndScaleSums(AccumType& sxw2, AccumType& sw2, AccumType& sx_M2w4, AccumType& ww_4u2,
247 const DataIterator& dataBegin, const WeightsIterator& weightsBegin,
248 uInt64 nr, uInt dataStride) const;
249
250 void _locationAndScaleSums(AccumType& sxw2, AccumType& sw2, AccumType& sx_M2w4, AccumType& ww_4u2,
251 const DataIterator& dataBegin, const WeightsIterator& weightsBegin,
252 uInt64 nr, uInt dataStride, const DataRanges& ranges,
253 Bool isInclude) const;
254
255 void _locationAndScaleSums(AccumType& sxw2, AccumType& sw2, AccumType& sx_M2w4, AccumType& ww_4u2,
256 const DataIterator& dataBegin, const WeightsIterator& weightsBegin,
257 uInt64 nr, uInt dataStride, const MaskIterator& maskBegin,
258 uInt maskStride, const DataRanges& ranges, Bool isInclude) const;
259
260 void _locationAndScaleSums(AccumType& sxw2, AccumType& sw2, AccumType& sx_M2w4, AccumType& ww_4u2,
261 const DataIterator& dataBegin, const WeightsIterator& weightBegin,
262 uInt64 nr, uInt dataStride, const MaskIterator& maskBegin,
263 uInt maskStride) const;
264 // </group>
265
266 // <group>
267 // sxw2 = sum(x_i*(1 - u_i^2)^2)
268 // sw2 = sum((1-u_i^2)^2)
269 void _locationSums(AccumType& sxw2, AccumType& sw2, const DataIterator& dataBegin, uInt64 nr,
270 uInt dataStride) const;
271
272 void _locationSums(AccumType& sxw2, AccumType& sw2, const DataIterator& dataBegin, uInt64 nr,
273 uInt dataStride, const DataRanges& ranges, Bool isInclude) const;
274
275 void _locationSums(AccumType& sxw2, AccumType& sw2, const DataIterator& dataBegin, uInt64 nr,
276 uInt dataStride, const MaskIterator& maskBegin, uInt maskStride) const;
277
278 void _locationSums(AccumType& sxw2, AccumType& sw2, const DataIterator& dataBegin, uInt64 nr,
279 uInt dataStride, const MaskIterator& maskBegin, uInt maskStride,
280 const DataRanges& ranges, Bool isInclude) const;
281
282 void _locationSums(AccumType& sxw2, AccumType& sw2, const DataIterator& dataBegin,
283 const WeightsIterator& weightsBegin, uInt64 nr, uInt dataStride) const;
284
285 void _locationSums(AccumType& sxw2, AccumType& sw2, const DataIterator& dataBegin,
286 const WeightsIterator& weightsBegin, uInt64 nr, uInt dataStride,
287 const DataRanges& ranges, Bool isInclude) const;
288
289 void _locationSums(AccumType& sxw2, AccumType& sw2, const DataIterator& dataBegin,
290 const WeightsIterator& weightsBegin, uInt64 nr, uInt dataStride,
291 const MaskIterator& maskBegin, uInt maskStride, const DataRanges& ranges,
292 Bool isInclude) const;
293
294 void _locationSums(AccumType& sxw2, AccumType& sw2, const DataIterator& dataBegin,
295 const WeightsIterator& weightBegin, uInt64 nr, uInt dataStride,
296 const MaskIterator& maskBegin, uInt maskStride) const;
297 // </group>
298
299 // <group>
300 // sx_M2w4 = sum((x_i - _location)^2 * (1 - u_i^2)^4) = sum((x_i - _location)^2 * w_i^4)
301 // ww_4u2 = sum((1 - u_i^2) * (1 - 5*u_i^2)) = sum(w_i * (w_i - 4*u_i^2))
302 void _scaleSums(AccumType& sx_M2w4, AccumType& ww_4u2, const DataIterator& dataBegin, uInt64 nr,
303 uInt dataStride) const;
304
305 void _scaleSums(AccumType& sx_M2w4, AccumType& ww_4u2, const DataIterator& dataBegin, uInt64 nr,
306 uInt dataStride, const DataRanges& ranges, Bool isInclude) const;
307
308 void _scaleSums(AccumType& sx_M2w4, AccumType& ww_4u2, const DataIterator& dataBegin, uInt64 nr,
309 uInt dataStride, const MaskIterator& maskBegin, uInt maskStride) const;
310
311 void _scaleSums(AccumType& sx_M2w4, AccumType& ww_4u2, const DataIterator& dataBegin, uInt64 nr,
312 uInt dataStride, const MaskIterator& maskBegin, uInt maskStride,
313 const DataRanges& ranges, Bool isInclude) const;
314
315 void _scaleSums(AccumType& sx_M2w4, AccumType& ww_4u2, const DataIterator& dataBegin,
316 const WeightsIterator& weightsBegin, uInt64 nr, uInt dataStride) const;
317
318 void _scaleSums(AccumType& sx_M2w4, AccumType& ww_4u2, const DataIterator& dataBegin,
319 const WeightsIterator& weightsBegin, uInt64 nr, uInt dataStride,
320 const DataRanges& ranges, Bool isInclude) const;
321
322 void _scaleSums(AccumType& sx_M2w4, AccumType& ww_4u2, const DataIterator& dataBegin,
323 const WeightsIterator& weightsBegin, uInt64 nr, uInt dataStride,
324 const MaskIterator& maskBegin, uInt maskStride, const DataRanges& ranges,
325 Bool isInclude) const;
326
327 void _scaleSums(AccumType& sx_M2w4, AccumType& ww_4u2, const DataIterator& dataBegin,
328 const WeightsIterator& weightBegin, uInt64 nr, uInt dataStride,
329 const MaskIterator& maskBegin, uInt maskStride) const;
330 // </group>
331};
332
333} // namespace casacore
334
335#ifndef CASACORE_NO_AUTO_TEMPLATES
336#include <casacore/scimath/StatsFramework/BiweightStatistics.tcc>
337#endif
338
339#endif
#define DataRanges
void _locationAndScaleSums(AccumType &sxw2, AccumType &sw2, AccumType &sx_M2w4, AccumType &ww_4u2, const DataIterator &dataBegin, uInt64 nr, uInt dataStride, const DataRanges &ranges, Bool isInclude) const
void _computeLocationAndScaleSums(AccumType &sxw2, AccumType &sw2, AccumType &sx_M2w4, AccumType &ww_4u2, DataIterator dataIter, MaskIterator maskIter, WeightsIterator weightsIter, uInt64 dataCount, const typename StatisticsDataset< CASA_STATP >::ChunkData &chunk)
void _locationSums(AccumType &sxw2, AccumType &sw2, const DataIterator &dataBegin, const WeightsIterator &weightsBegin, uInt64 nr, uInt dataStride, const DataRanges &ranges, Bool isInclude) const
void _locationSums(AccumType &sxw2, AccumType &sw2, const DataIterator &dataBegin, uInt64 nr, uInt dataStride) const
sxw2 = sum(x_i*(1 - u_i^2)^2) sw2 = sum((1-u_i^2)^2)
uInt64 _npts
_npts is the number of points computed using ClassicalStatistics
void _scaleSums(AccumType &sx_M2w4, AccumType &ww_4u2, const DataIterator &dataBegin, const WeightsIterator &weightsBegin, uInt64 nr, uInt dataStride, const DataRanges &ranges, Bool isInclude) const
void _locationAndScaleSums(AccumType &sxw2, AccumType &sw2, AccumType &sx_M2w4, AccumType &ww_4u2, const DataIterator &dataBegin, const WeightsIterator &weightsBegin, uInt64 nr, uInt dataStride, const MaskIterator &maskBegin, uInt maskStride, const DataRanges &ranges, Bool isInclude) const
void _scaleSums(AccumType &sx_M2w4, AccumType &ww_4u2, const DataIterator &dataBegin, uInt64 nr, uInt dataStride, const DataRanges &ranges, Bool isInclude) const
void _locationAndScaleSums(AccumType &sxw2, AccumType &sw2, AccumType &sx_M2w4, AccumType &ww_4u2, const DataIterator &dataBegin, uInt64 nr, uInt dataStride, const MaskIterator &maskBegin, uInt maskStride, const DataRanges &ranges, Bool isInclude) const
void _locationAndScaleSums(AccumType &sxw2, AccumType &sw2, AccumType &sx_M2w4, AccumType &ww_4u2, const DataIterator &dataBegin, const WeightsIterator &weightBegin, uInt64 nr, uInt dataStride, const MaskIterator &maskBegin, uInt maskStride) const
virtual AccumType getMedianAndQuantiles(std::map< Double, AccumType > &quantileToValue, const std::set< Double > &quantiles, std::shared_ptr< uInt64 > knownNpts=nullptr, std::shared_ptr< AccumType > knownMin=nullptr, std::shared_ptr< AccumType > knownMax=nullptr, uInt binningThreshholdSizeBytes=4096 *4096, Bool persistSortedArray=False, uInt nBins=10000)
void _scaleSums(AccumType &sx_M2w4, AccumType &ww_4u2, const DataIterator &dataBegin, const WeightsIterator &weightsBegin, uInt64 nr, uInt dataStride) const
void _scaleSums(AccumType &sx_M2w4, AccumType &ww_4u2, const DataIterator &dataBegin, uInt64 nr, uInt dataStride) const
sx_M2w4 = sum((x_i - _location)^2 * (1 - u_i^2)^4) = sum((x_i - _location)^2 * w_i^4) ww_4u2 = sum((1...
virtual std::map< Double, AccumType > getQuantiles(const std::set< Double > &quantiles, std::shared_ptr< uInt64 > npts=nullptr, std::shared_ptr< AccumType > min=nullptr, std::shared_ptr< AccumType > max=nullptr, uInt binningThreshholdSizeBytes=4096 *4096, Bool persistSortedArray=False, uInt nBins=10000)
virtual void setStatsToCalculate(std::set< StatisticsData::STATS > &stats)
Provide guidance to algorithms by specifying a priori which statistics the caller would like calculat...
virtual AccumType getMedianAbsDevMed(std::shared_ptr< uInt64 > knownNpts=nullptr, std::shared_ptr< AccumType > knownMin=nullptr, std::shared_ptr< AccumType > knownMax=nullptr, uInt binningThreshholdSizeBytes=4096 *4096, Bool persistSortedArray=False, uInt nBins=10000)
void _locationSums(AccumType &sxw2, AccumType &sw2, const DataIterator &dataBegin, const WeightsIterator &weightBegin, uInt64 nr, uInt dataStride, const MaskIterator &maskBegin, uInt maskStride) const
virtual void setCalculateAsAdded(Bool c)
If c is True, an exception is thrown; this algorithm does not support computing stats as data are add...
void _scaleSums(AccumType &sx_M2w4, AccumType &ww_4u2, const DataIterator &dataBegin, uInt64 nr, uInt dataStride, const MaskIterator &maskBegin, uInt maskStride) const
virtual void reset()
reset object to initial state.
void _locationAndScaleSums(AccumType &sxw2, AccumType &sw2, AccumType &sx_M2w4, AccumType &ww_4u2, const DataIterator &dataBegin, const WeightsIterator &weightsBegin, uInt64 nr, uInt dataStride) const
void _locationSums(AccumType &sxw2, AccumType &sw2, const DataIterator &dataBegin, uInt64 nr, uInt dataStride, const DataRanges &ranges, Bool isInclude) const
void _locationAndScaleSums(AccumType &sxw2, AccumType &sw2, AccumType &sx_M2w4, AccumType &ww_4u2, const DataIterator &dataBegin, const WeightsIterator &weightsBegin, uInt64 nr, uInt dataStride, const DataRanges &ranges, Bool isInclude) const
virtual StatisticsAlgorithm< CASA_STATP > * clone() const
Clone this instance.
void _locationAndScaleSums(AccumType &sxw2, AccumType &sw2, AccumType &sx_M2w4, AccumType &ww_4u2, const DataIterator &dataBegin, uInt64 nr, uInt dataStride, const MaskIterator &maskBegin, uInt maskStride) const
void _scaleSums(AccumType &sx_M2w4, AccumType &ww_4u2, const DataIterator &dataBegin, const WeightsIterator &weightsBegin, uInt64 nr, uInt dataStride, const MaskIterator &maskBegin, uInt maskStride, const DataRanges &ranges, Bool isInclude) const
void _computeScaleSums(AccumType &sx_M2w4, AccumType &ww_4u2, DataIterator dataIter, MaskIterator maskIter, WeightsIterator weightsIter, uInt64 dataCount, const typename StatisticsDataset< CASA_STATP >::ChunkData &chunk) const
void _locationSums(AccumType &sxw2, AccumType &sw2, const DataIterator &dataBegin, const WeightsIterator &weightsBegin, uInt64 nr, uInt dataStride) const
virtual StatisticsData::ALGORITHM algorithm() const
get the algorithm that this object uses for computing stats
void _locationAndScaleSums(AccumType &sxw2, AccumType &sw2, AccumType &sx_M2w4, AccumType &ww_4u2, const DataIterator &dataBegin, uInt64 nr, uInt dataStride) const
sxw2 = sum(x_i*(1 - u_i^2)^2) sw2 = sum((1-u_i^2)^2) sx_M2w4 = sum((x_i - _location)^2 * (1 - u_i^2)^...
void _scaleSums(AccumType &sx_M2w4, AccumType &ww_4u2, const DataIterator &dataBegin, uInt64 nr, uInt dataStride, const MaskIterator &maskBegin, uInt maskStride, const DataRanges &ranges, Bool isInclude) const
std::pair< AccumType, AccumType > _range
virtual StatsData< AccumType > _getStatistics()
void _locationSums(AccumType &sxw2, AccumType &sw2, const DataIterator &dataBegin, const WeightsIterator &weightsBegin, uInt64 nr, uInt dataStride, const MaskIterator &maskBegin, uInt maskStride, const DataRanges &ranges, Bool isInclude) const
virtual std::pair< Int64, Int64 > getStatisticIndex(StatisticsData::STATS stat)
see base class description
static const AccumType FOUR
because the compiler gets confused if these aren't explicitly typed
BiweightStatistics(Int maxNiter=3, Double c=6.0)
void _computeLocationSums(AccumType &sxw2, AccumType &sw2, DataIterator dataIter, MaskIterator maskIter, WeightsIterator weightsIter, uInt64 dataCount, const typename StatisticsDataset< CASA_STATP >::ChunkData &chunk)
BiweightStatistics< CASA_STATP > & operator=(const BiweightStatistics< CASA_STATP > &other)
copy semantics
void _locationSums(AccumType &sxw2, AccumType &sw2, const DataIterator &dataBegin, uInt64 nr, uInt dataStride, const MaskIterator &maskBegin, uInt maskStride, const DataRanges &ranges, Bool isInclude) const
void _locationSums(AccumType &sxw2, AccumType &sw2, const DataIterator &dataBegin, uInt64 nr, uInt dataStride, const MaskIterator &maskBegin, uInt maskStride) const
BiweightStatistics(const BiweightStatistics< CASA_STATP > &other)
copy semantics
void _scaleSums(AccumType &sx_M2w4, AccumType &ww_4u2, const DataIterator &dataBegin, const WeightsIterator &weightBegin, uInt64 nr, uInt dataStride, const MaskIterator &maskBegin, uInt maskStride) const
virtual AccumType getMedian(std::shared_ptr< uInt64 > knownNpts=nullptr, std::shared_ptr< AccumType > knownMin=nullptr, std::shared_ptr< AccumType > knownMax=nullptr, uInt binningThreshholdSizeBytes=4096 *4096, Bool persistSortedArray=False, uInt nBins=10000)
these statistics are not supported.
Int getNiter() const
returns the number of iterations performed to compute the current location and scale values
Base class of statistics algorithm class hierarchy.
ALGORITHM
implemented algorithms
For temporary backward namespace compatibility, use casa as alias for casacore.
Definition mainpage.dox:28
const Bool False
Definition aipstype.h:42
LatticeExprNode max(const LatticeExprNode &left, const LatticeExprNode &right)
unsigned int uInt
Definition aipstype.h:49
LatticeExprNode min(const LatticeExprNode &left, const LatticeExprNode &right)
int Int
Definition aipstype.h:48
bool Bool
Define the standard types used by Casacore.
Definition aipstype.h:40
double Double
Definition aipstype.h:53
unsigned long long uInt64
Definition aipsxtype.h:37
holds information about a data chunk.