28 #ifndef CASA_ARRAYPARTMATH_H 29 #define CASA_ARRAYPARTMATH_H 31 #include <casacore/casa/aips.h> 32 #include <casacore/casa/Arrays/ArrayMath.h> 33 #include <casacore/casa/Arrays/ArrayMathBase.h> 122 return partialVariances (array, collapseAxes,
123 partialMeans (array, collapseAxes));
131 return sqrt (partialVariances (array, collapseAxes,
132 partialMeans (array, collapseAxes)));
138 return sqrt (partialVariances (array, collapseAxes, means));
143 return partialAvdevs (array, collapseAxes,
144 partialMeans (array, collapseAxes));
163 template<
class T>
Array<T> partialInterFractileRanges (
const Array<T>& array,
170 {
return partialInterFractileRanges (array, collapseAxes, 1./6., inPlace); }
174 {
return partialInterFractileRanges (array, collapseAxes, 0.25, inPlace); }
185 virtual T operator() (
const Array<T>& arr)
const {
return sum(arr); }
190 virtual T operator() (
const Array<T>& arr)
const {
return sumsqr(arr); }
200 virtual T operator() (
const Array<T>& arr)
const {
return min(arr); }
205 virtual T operator() (
const Array<T>& arr)
const {
return max(arr); }
230 virtual T operator() (
const Array<T>& arr)
const {
return rms(arr); }
236 : itsSorted(sorted), itsTakeEvenMean(takeEvenMean), itsInPlace(inPlace) {}
239 {
return median(arr, itsTmp, itsSorted, itsTakeEvenMean, itsInPlace); }
250 : itsSorted(sorted), itsTakeEvenMean(takeEvenMean), itsInPlace(inPlace) {}
253 {
return madfm(arr, itsTmp, itsSorted, itsTakeEvenMean, itsInPlace); }
264 : itsFraction(fraction), itsSorted(sorted), itsInPlace(inPlace) {}
267 {
return fractile(arr, itsTmp, itsFraction, itsSorted, itsInPlace); }
278 : itsFraction(fraction), itsSorted(sorted), itsInPlace(inPlace) {}
281 {
return interFractileRange(arr, itsTmp, itsFraction,
282 itsSorted, itsInPlace); }
314 partialArrayMath (res, a, collapseAxes, funcObj);
317 template<
typename T,
typename RES>
345 template<
typename T,
typename RES>
385 template<
typename T,
typename RES>
407 #ifndef CASACORE_NO_AUTO_TEMPLATES 408 #include <casacore/casa/Arrays/ArrayPartMath.tcc> 409 #endif //# CASACORE_NO_AUTO_TEMPLATES A Vector of integers, for indexing into Array<T> objects.
virtual T operator()(const Array< T > &arr) const
Define functors to perform a reduction function on an Array object.
TableExprNode means(const TableExprNode &array, const TableExprNodeSet &collapseAxes)
LatticeExprNode median(const LatticeExprNode &expr)
T product(const TableVector< T > &tv)
TableExprNode array(const TableExprNode &values, const TableExprNodeSet &shape)
Create an array of the given shape and fill it with the values.
LatticeExprNode sum(const LatticeExprNode &expr)
LatticeExprNode max(const LatticeExprNode &left, const LatticeExprNode &right)
Array< T > partialInterQuartileRanges(const Array< T > &array, const IPosition &collapseAxes, Bool inPlace=False)
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...
InterFractileRangeFunc(Float fraction, Bool sorted=False, Bool inPlace=False)
InterQuartileRangeFunc(Bool sorted=False, Bool inPlace=False)
void fillBoxedShape(const IPosition &shape, const IPosition &boxShape, IPosition &fullBoxShape, IPosition &resultShape)
Helper functions for boxed and sliding functions.
virtual ~InterQuartileRangeFunc()
virtual ~InterHexileRangeFunc()
InterHexileRangeFunc(Bool sorted=False, Bool inPlace=False)
LatticeExprNode min(const LatticeExprNode &left, const LatticeExprNode &right)
LatticeExprNode avdev(const LatticeExprNode &expr)
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 > partialArrayMath(const Array< T > &a, const IPosition &collapseAxes, const ArrayFunctorBase< T > &funcObj)
Do partial reduction of an Array object.
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 sqrt(const LatticeExprNode &expr)
Basic class for math on Array objects.
bool Bool
Define the standard types used by Casacore.
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 stddev(const LatticeExprNode &expr)
MadfmFunc(Bool sorted=False, Bool takeEvenMean=True, Bool inPlace=False)
TableExprNode shape(const TableExprNode &array)
Function operating on any scalar or array resulting in a Double array containing the shape...
template <class T, class U> class vector;
FractileFunc(Float fraction, Bool sorted=False, Bool inPlace=False)
Array< T > partialAvdevs(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...
LatticeExprNode mean(const LatticeExprNode &expr)
TableExprNode rms(const TableExprNode &array)
Array< T > partialVariances(const Array< T > &array, const IPosition &collapseAxes)
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...
Array< T > partialInterHexileRanges(const Array< T > &array, const IPosition &collapseAxes, Bool inPlace=False)
virtual ~InterFractileRangeFunc()
LatticeExprNode variance(const LatticeExprNode &expr)
Array< T > partialStddevs(const Array< T > &array, const IPosition &collapseAxes, const Array< T > &means)
Array< T > partialStddevs(const Array< T > &array, const IPosition &collapseAxes)
this file contains all the compiler specific defines
virtual T operator()(const Array< T > &arr) const