26#ifndef CASA_ARRAYPARTMATH_2_H
27#define CASA_ARRAYPARTMATH_2_H
120 const IPosition& collapseAxes,
size_t ddof=1)
160 bool takeEvenMean=
false,
164 bool takeEvenMean=
false,
192 virtual T operator() (
const Array<T>& arr)
const final override {
return sum(arr); }
197 virtual T operator() (
const Array<T>& arr)
const final override {
return sumsqr(arr); }
202 virtual T operator() (
const Array<T>& arr)
const final override {
return product(arr); }
207 virtual T operator() (
const Array<T>& arr)
const final override {
return min(arr); }
212 virtual T operator() (
const Array<T>& arr)
const final override {
return max(arr); }
217 virtual T operator() (
const Array<T>& arr)
const final override {
return mean(arr); }
224 virtual T operator() (
const Array<T>& arr)
const final override {
return pvariance(arr,
itsDdof); }
233 virtual T operator() (
const Array<T>& arr)
const final override {
return pstddev(arr,
itsDdof); }
240 virtual T operator() (
const Array<T>& arr)
const final override {
return avdev(arr); }
245 virtual T operator() (
const Array<T>& arr)
const final override {
return rms(arr); }
249 explicit MedianFunc (
bool sorted=
false,
bool takeEvenMean=
true,
250 bool inPlace =
false)
253 virtual T operator() (
const Array<T>& arr)
const final override
263 explicit MadfmFunc(
bool sorted =
false,
bool takeEvenMean =
true,
264 bool inPlace =
false)
278 bool sorted =
false,
bool inPlace =
false)
281 virtual T operator() (
const Array<T>& arr)
const final override
292 bool sorted =
false,
bool inPlace =
false)
332 template<
typename T,
typename RES>
360 template<
typename T,
typename RES>
400 template<
typename T,
typename RES>
422#include "ArrayPartMath.tcc"
virtual T operator()(const Array< T > &arr) const final override
virtual T operator()(const Array< T > &arr) const final override
FractileFunc(float fraction, bool sorted=false, bool inPlace=false)
InterFractileRangeFunc(float fraction, bool sorted=false, bool inPlace=false)
virtual ~InterFractileRangeFunc()
virtual T operator()(const Array< T > &arr) const final override
virtual ~InterHexileRangeFunc()
InterHexileRangeFunc(bool sorted=false, bool inPlace=false)
InterQuartileRangeFunc(bool sorted=false, bool inPlace=false)
virtual ~InterQuartileRangeFunc()
MadfmFunc(bool sorted=false, bool takeEvenMean=true, bool inPlace=false)
virtual T operator()(const Array< T > &arr) const final override
virtual T operator()(const Array< T > &arr) const final override
virtual T operator()(const Array< T > &arr) const final override
virtual T operator()(const Array< T > &arr) const final override
virtual T operator()(const Array< T > &arr) const final override
virtual T operator()(const Array< T > &arr) const final override
virtual T operator()(const Array< T > &arr) const final override
Define functors to perform a reduction function on an Array object.
virtual T operator()(const Array< T > &arr) const final override
virtual T operator()(const Array< T > &arr) const final override
virtual T operator()(const Array< T > &arr) const final override
VarianceFunc(size_t ddof)
this file contains all the compiler specific defines
LatticeExprNode fractile(const LatticeExprNode &expr, const LatticeExprNode &fraction)
Determine the value of the element at the part fraction from the beginning of the given lattice.
TableExprNode means(const TableExprNode &array, const TableExprNodeSet &collapseAxes)
LatticeExprNode mean(const LatticeExprNode &expr)
MaskedArray< T > boxedArrayMath(const MaskedArray< T > &array, const IPosition &boxSize, const FuncType &funcObj)
Apply the given ArrayMath reduction function objects to each box in the array.
LatticeExprNode max(const LatticeExprNode &left, const LatticeExprNode &right)
LatticeExprNode sum(const LatticeExprNode &expr)
TYPE * array
the allocated array
LatticeExprNode min(const LatticeExprNode &left, const LatticeExprNode &right)
LatticeExprNode sqrt(const LatticeExprNode &expr)
IPosition shape(const RecordFieldId &) const
Get the actual shape of this field.
T product(const TableVector< T > &tv)
LatticeExprNode avdev(const LatticeExprNode &expr)
bool fillSlidingShape(const IPosition &shape, const IPosition &halfBoxSize, IPosition &boxEnd, IPosition &resultShape)
Determine the box end and shape of result for a sliding operation.
LatticeExprNode median(const LatticeExprNode &expr)
Array< T > slidingArrayMath(const MaskedArray< T > &array, const IPosition &halfBoxSize, const FuncType &funcObj, bool fillEdge=true)
Apply for each element in the array the given ArrayMath reduction function object to the box around t...
void fillBoxedShape(const IPosition &shape, const IPosition &boxShape, IPosition &fullBoxShape, IPosition &resultShape)
Helper functions for boxed and sliding functions.
TableExprNode rms(const TableExprNode &array)
Array< T > partialAvdevs(const Array< T > &array, const IPosition &collapseAxes, const Array< T > &means)
Array< T > partialMedians(const Array< T > &array, const IPosition &collapseAxes, bool takeEvenMean=false, bool inPlace=false)
Array< T > partialRmss(const Array< T > &array, const IPosition &collapseAxes)
Array< T > partialStddevs(const Array< T > &array, const IPosition &collapseAxes, const Array< T > &means, size_t ddof=1)
Array< T > partialVariances(const Array< T > &array, const IPosition &collapseAxes, const Array< T > &means, size_t ddof)
Array< T > partialProducts(const Array< T > &array, const IPosition &collapseAxes)
Array< T > slidingArrayMath(const Array< T > &a, const IPosition &halfBoxSize, const ArrayFunctorBase< T > &funcObj, bool fillEdge=true)
Apply for each element in the array the given ArrayMath reduction function object to the box around t...
Array< T > partialVariances(const Array< T > &array, const IPosition &collapseAxes, const Array< T > &means)
Array< T > partialInterQuartileRanges(const Array< T > &array, const IPosition &collapseAxes, bool inPlace=false)
Array< T > partialMins(const Array< T > &array, const IPosition &collapseAxes)
Array< T > partialStddevs(const Array< T > &array, const IPosition &collapseAxes, size_t ddof=1)
Array< T > partialAvdevs(const Array< T > &array, const IPosition &collapseAxes)
Array< T > partialInterHexileRanges(const Array< T > &array, const IPosition &collapseAxes, bool inPlace=false)
Array< T > partialInterFractileRanges(const Array< T > &array, const IPosition &collapseAxes, float fraction, bool inPlace=false)
Array< T > boxedArrayMath(const Array< T > &a, const IPosition &boxSize, const ArrayFunctorBase< T > &funcObj)
Apply the given ArrayMath reduction function objects to each box in the array.
Array< T > partialFractiles(const Array< T > &array, const IPosition &collapseAxes, float fraction, bool inPlace=false)
Array< T > partialArrayMath(const Array< T > &a, const IPosition &collapseAxes, const ArrayFunctorBase< T > &funcObj)
Do partial reduction of an Array object.
void boxedArrayMath(Array< RES > &, const Array< T > &array, const IPosition &boxSize, const ArrayFunctorBase< T, RES > &funcObj)
Array< T > partialVariances(const Array< T > &array, const IPosition &collapseAxes, size_t ddof=1)
Array< std::complex< T > > partialVariances(const Array< std::complex< T > > &array, const IPosition &collapseAxes, const Array< std::complex< T > > &means, size_t ddof)
Array< T > partialMeans(const Array< T > &array, const IPosition &collapseAxes)
Array< T > partialMaxs(const Array< T > &array, const IPosition &collapseAxes)
void partialArrayMath(Array< RES > &res, const Array< T > &a, const IPosition &collapseAxes, const ArrayFunctorBase< T, RES > &funcObj)
void slidingArrayMath(Array< RES > &res, const Array< T > &array, const IPosition &halfBoxSize, const ArrayFunctorBase< T, RES > &funcObj, bool fillEdge=true)
Array< T > partialMadfms(const Array< T > &array, const IPosition &collapseAxes, bool takeEvenMean=false, bool inPlace=false)
Array< T > partialSums(const Array< T > &array, const IPosition &collapseAxes)
Determine the sum, product, etc.
Array< T > partialSumSqrs(const Array< T > &array, const IPosition &collapseAxes)