28 #ifndef CASA_MASKARRMATH_2_H
29 #define CASA_MASKARRMATH_2_H
435 {
return madfm (a, sorted, (a.
nelements() <= 100)); }
521 template <
typename T,
typename FuncType>
524 const FuncType& funcObj);
550 template <
typename T,
typename FuncType>
553 const FuncType& funcObj,
559 #include "MaskArrMath.tcc"
size_t nelements() const
The number of elements of this masked array.
T operator()(const MaskedArray< T > &arr) const
MaskedMadfmFunc(bool sorted=false, bool takeEvenMean=true)
float operator()(const MaskedArray< float > &arr) const
T operator()(const MaskedArray< T > &arr) const
T operator()(const MaskedArray< T > &arr) const
T operator()(const MaskedArray< T > &arr) const
T operator()(const MaskedArray< T > &arr) const
T operator()(const MaskedArray< T > &arr) const
T operator()(const MaskedArray< T > &arr) const
T operator()(const MaskedArray< T > &arr) const
T operator()(const MaskedArray< T > &arr) const
this file contains all the compiler specific defines
LatticeExprNode mean(const LatticeExprNode &expr)
LatticeExprNode max(const LatticeExprNode &left, const LatticeExprNode &right)
LatticeExprNode sum(const LatticeExprNode &expr)
LatticeExprNode operator+(const LatticeExprNode &expr)
Global functions operating on a LatticeExprNode.
MVBaseline operator*(const RotMatrix &left, const MVBaseline &right)
Rotate a Baseline vector with rotation matrix and other multiplications.
LatticeExprNode stddev(const LatticeExprNode &expr)
LatticeExprNode min(const LatticeExprNode &left, const LatticeExprNode &right)
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 operator-(const LatticeExprNode &expr)
TableExprNode array(const TableExprNode &values, const TableExprNodeSet &shape)
Create an array of the given shape and fill it with the values.
LatticeExprNode operator/(const LatticeExprNode &left, const LatticeExprNode &right)
LatticeExprNode variance(const LatticeExprNode &expr)
T product(const TableVector< T > &tv)
LatticeExprNode avdev(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...
TableExprNode marray(const TableExprNode &array, const TableExprNode &mask)
Form a masked array.
LatticeExprNode median(const LatticeExprNode &expr)
LatticeExprNode real(const LatticeExprNode &expr)
LatticeExprNode imag(const LatticeExprNode &expr)
TableExprNode rms(const TableExprNode &array)
MaskedArray< T > fmod(const MaskedArray< T > &left, const MaskedArray< T > &right)
T pvariance(const MaskedArray< T > &a, size_t ddof=0)
T stddev(const MaskedArray< T > &a, T mean)
MaskedArray< T > cos(const MaskedArray< T > &left)
MaskedArray< T > max(const MaskedArray< T > &left, const MaskedArray< T > &right)
MaskedArray< T > fmod(const T &left, const MaskedArray< T > &right)
MaskedArray< T > max(const MaskedArray< T > &left, const T &right)
T product(const MaskedArray< T > &a)
Product of every element of the MaskedArray where the Mask is true.
T median(const MaskedArray< T > &a, bool sorted, bool takeEvenMean)
MaskedArray< T > min(const MaskedArray< T > &left, const MaskedArray< T > &right)
T max(const MaskedArray< T > &left)
The maximum element of the array.
T mean(const MaskedArray< T > &a)
The mean of "a" is the sum of all elements of "a" divided by the number of elements of "a".
T sum(const MaskedArray< T > &a)
void min(const MaskedArray< T > &result, const Array< T > &left, const Array< T > &right)
"result" contains the minimum of "left" and "right" at each position.
MaskedArray< T > max(const T &left, const MaskedArray< T > &right)
MaskedArray< T > sqrt(const MaskedArray< T > &left)
T pstddev(const MaskedArray< T > &a, size_t ddof=0)
MaskedArray< T > abs(const MaskedArray< T > &left)
MaskedArray< T > floor(const MaskedArray< T > &left)
MaskedArray< T > max(const Array< T > &left, const MaskedArray< T > &right)
MaskedArray< T > imag(const MaskedArray< std::complex< T >> &carray)
Extracts the imaginary part of a complex array into an array of floats.
T madfm(const MaskedArray< T > &a, bool sorted=false)
The median absolute deviation from the median.
MaskedArray< T > fmod(const Array< T > &left, const MaskedArray< T > &right)
MaskedArray< T > fmod(const MaskedArray< T > &left, const Array< T > &right)
MaskedArray< T > min(const Array< T > &left, const MaskedArray< T > &right)
MaskedArray< T > min(const MaskedArray< T > &left, const T &right)
T median(const MaskedArray< T > &a, bool sorted=false)
The median of "a" is a(n/2).
MaskedArray< T > atan2(const Array< T > &left, const MaskedArray< T > &right)
T variance(const MaskedArray< T > &a, T mean)
Rather than using a computed mean, use the supplied value.
MaskedArray< T > pow(const MaskedArray< T > &left, const MaskedArray< U > &right)
MaskedArray< T > atan2(const MaskedArray< T > &left, const Array< T > &right)
Transcendental functions requiring two arguments applied on an element-by-element basis.
MaskedArray< T > cosh(const MaskedArray< T > &left)
MaskedArray< T > operator+(const MaskedArray< T > &a)
Unary arithmetic operation.
MaskedArray< T > sin(const MaskedArray< T > &left)
Transcendental function applied to the array on an element-by-element basis.
MaskedArray< T > fmod(const MaskedArray< T > &left, const T &right)
MaskedArray< T > log10(const MaskedArray< T > &left)
T min(const MaskedArray< T > &left)
The "min" and "max" functions require that the type "T" have comparison operators.
MaskedArray< T > min(const T &left, const MaskedArray< T > &right)
MaskedArray< T > acos(const MaskedArray< T > &left)
void max(const MaskedArray< T > &result, const Array< T > &left, const Array< T > &right)
"result" contains the maximum of "left" and "right" at each position.
MaskedArray< T > real(const MaskedArray< std::complex< T >> &carray)
Extracts the real part of a complex array into an array of floats.
MaskedArray< T > log(const MaskedArray< T > &left)
MaskedArray< T > ceil(const MaskedArray< T > &left)
T avdev(const MaskedArray< T > &a)
The average deviation of "a" is the sum of abs(a(i) - mean(a))/N.
T sumsquares(const MaskedArray< T > &a)
Sum of the squares of every element of the MaskedArray where the Mask is true.
MaskedArray< T > asin(const MaskedArray< T > &left)
MaskedArray< T > atan2(const MaskedArray< T > &left, const MaskedArray< T > &right)
T pvariance(const MaskedArray< T > &a, T mean, size_t ddof=0)
T variance(const MaskedArray< T > &a)
The variance of "a" is the sum of (a(i) - mean(a))**2/(a.nelements() - ddof).
MaskedArray< T > max(const MaskedArray< T > &left, const Array< T > &right)
Return an array that contains the maximum of "left" and "right" at each position.
T rms(const MaskedArray< T > &a)
The root-mean-square of "a" is the sqrt of sum(a*a)/N.
MaskedArray< T > atan(const MaskedArray< T > &left)
MaskedArray< T > tanh(const MaskedArray< T > &left)
void minMax(T &minVal, T &maxVal, IPosition &minPos, IPosition &maxPos, const MaskedArray< T > &marray)
Find the minimum and maximum values of a MaskedArray.
T avdev(const MaskedArray< T > &a, T mean)
The average deviation of "a" is the sum of abs(a(i) - mean(a))/N.
void minMax(T &minVal, T &maxVal, const MaskedArray< T > &marray)
T stddev(const MaskedArray< T > &a)
The standard deviation of "a" is the square root of its variance.
MaskedArray< T > cube(const MaskedArray< T > &val)
Returns a MaskedArray where every element is cubed.
MaskedArray< T > pow(const MaskedArray< T > &left, const double &right)
MaskedArray< T > operator-(const MaskedArray< T > &a)
MaskedArray< T > fabs(const MaskedArray< T > &left)
T madfm(const MaskedArray< T > &a, bool sorted, bool takeEvenMean)
MaskedArray< T > min(const MaskedArray< T > &left, const Array< T > &right)
Return an array that contains the minimum of "left" and "right" at each position.
MaskedArray< T > pow(const Array< T > &left, const MaskedArray< U > &right)
MaskedArray< T > exp(const MaskedArray< T > &left)
MaskedArray< T > atan2(const T &left, const MaskedArray< T > &right)
T pstddev(const MaskedArray< T > &a, T mean, size_t ddof=0)
void indgen(MaskedArray< T > &a, T start, T inc)
Fills all elements of "array" where the mask is true with a sequence starting with "start" and increm...
MaskedArray< T > square(const MaskedArray< T > &val)
Returns a MaskedArray where every element is squared.
void indgen(MaskedArray< T > &a, T start)
Fills all elements of "array" where the mask is true with a sequence starting with "start" and increm...
MaskedArray< T > sinh(const MaskedArray< T > &left)
MaskedArray< T > tan(const MaskedArray< T > &left)
MaskedArray< T > atan2(const MaskedArray< T > &left, const T &right)
MaskedArray< T > pow(const MaskedArray< T > &left, const Array< U > &right)
void indgen(MaskedArray< T > &a)
Fills all elements of "array" where the mask is true with a sequence starting with 0 and incremented ...