casa
$Rev:20696$
|
Mathematical operations for MaskedArrays (and with Arrays) More...
#include <MaskArrMath.h>
Public Member Functions | |
template<class T > | |
const MaskedArray< T > & | operator+= (const MaskedArray< T > &left, const Array< T > &other) |
Element by element arithmetic modifying left in-place. | |
template<class T > | |
const MaskedArray< T > & | operator-= (const MaskedArray< T > &left, const Array< T > &other) |
template<class T > | |
const MaskedArray< T > & | operator*= (const MaskedArray< T > &left, const Array< T > &other) |
template<class T > | |
const MaskedArray< T > & | operator/= (const MaskedArray< T > &left, const Array< T > &other) |
template<class T > | |
Array< T > & | operator+= (Array< T > &left, const MaskedArray< T > &other) |
template<class T > | |
Array< T > & | operator-= (Array< T > &left, const MaskedArray< T > &other) |
template<class T > | |
Array< T > & | operator*= (Array< T > &left, const MaskedArray< T > &other) |
template<class T > | |
Array< T > & | operator/= (Array< T > &left, const MaskedArray< T > &other) |
template<class T > | |
const MaskedArray< T > & | operator+= (const MaskedArray< T > &left, const MaskedArray< T > &other) |
template<class T > | |
const MaskedArray< T > & | operator-= (const MaskedArray< T > &left, const MaskedArray< T > &other) |
template<class T > | |
const MaskedArray< T > & | operator*= (const MaskedArray< T > &left, const MaskedArray< T > &other) |
template<class T > | |
const MaskedArray< T > & | operator/= (const MaskedArray< T > &left, const MaskedArray< T > &other) |
template<class T , class S > | |
const MaskedArray< T > & | operator/= (const MaskedArray< T > &left, const MaskedArray< S > &other) |
template<class T > | |
const MaskedArray< T > & | operator+= (const MaskedArray< T > &left, const T &other) |
Element by element arithmetic modifying left in-place. | |
template<class T > | |
const MaskedArray< T > & | operator-= (const MaskedArray< T > &left, const T &other) |
template<class T > | |
const MaskedArray< T > & | operator*= (const MaskedArray< T > &left, const T &other) |
template<class T > | |
const MaskedArray< T > & | operator/= (const MaskedArray< T > &left, const T &other) |
template<class T > | |
MaskedArray< T > | operator+ (const MaskedArray< T > &a) |
Unary arithmetic operation. | |
template<class T > | |
MaskedArray< T > | operator- (const MaskedArray< T > &a) |
template<class T > | |
MaskedArray< T > | operator+ (const MaskedArray< T > &left, const Array< T > &right) |
Element by element arithmetic on MaskedArrays, returns a MaskedArray. | |
template<class T > | |
MaskedArray< T > | operator- (const MaskedArray< T > &left, const Array< T > &right) |
template<class T > | |
MaskedArray< T > | operator* (const MaskedArray< T > &left, const Array< T > &right) |
template<class T > | |
MaskedArray< T > | operator/ (const MaskedArray< T > &left, const Array< T > &right) |
template<class T > | |
MaskedArray< T > | operator+ (const Array< T > &left, const MaskedArray< T > &right) |
template<class T > | |
MaskedArray< T > | operator- (const Array< T > &left, const MaskedArray< T > &right) |
template<class T > | |
MaskedArray< T > | operator* (const Array< T > &left, const MaskedArray< T > &right) |
template<class T > | |
MaskedArray< T > | operator/ (const Array< T > &left, const MaskedArray< T > &right) |
template<class T > | |
MaskedArray< T > | operator+ (const MaskedArray< T > &left, const MaskedArray< T > &right) |
template<class T > | |
MaskedArray< T > | operator- (const MaskedArray< T > &left, const MaskedArray< T > &right) |
template<class T > | |
MaskedArray< T > | operator* (const MaskedArray< T > &left, const MaskedArray< T > &right) |
template<class T > | |
MaskedArray< T > | operator/ (const MaskedArray< T > &left, const MaskedArray< T > &right) |
template<class T > | |
MaskedArray< T > | operator+ (const MaskedArray< T > &left, const T &right) |
Element by element arithmetic between a MaskedArray and a scalar, returning a MaskedArray. | |
template<class T > | |
MaskedArray< T > | operator- (const MaskedArray< T > &left, const T &right) |
template<class T > | |
MaskedArray< T > | operator* (const MaskedArray< T > &left, const T &right) |
template<class T > | |
MaskedArray< T > | operator/ (const MaskedArray< T > &left, const T &right) |
MaskedArray< Complex > | operator* (const MaskedArray< Complex > &left, const Float &right) |
template<class T > | |
MaskedArray< T > | operator+ (const T &left, const MaskedArray< T > &right) |
Element by element arithmetic between a scalar and a MaskedArray, returning a MaskedArray. | |
template<class T > | |
MaskedArray< T > | operator- (const T &left, const MaskedArray< T > &right) |
template<class T > | |
MaskedArray< T > | operator* (const T &left, const MaskedArray< T > &right) |
template<class T > | |
MaskedArray< T > | operator/ (const T &left, const MaskedArray< T > &right) |
MaskedArray< Complex > | operator* (const Float &left, const MaskedArray< Complex > &right) |
template<class T > | |
MaskedArray< T > | sin (const MaskedArray< T > &left) |
Transcendental function applied to the array on an element-by-element basis. | |
template<class T > | |
MaskedArray< T > | cos (const MaskedArray< T > &left) |
template<class T > | |
MaskedArray< T > | tan (const MaskedArray< T > &left) |
template<class T > | |
MaskedArray< T > | asin (const MaskedArray< T > &left) |
template<class T > | |
MaskedArray< T > | acos (const MaskedArray< T > &left) |
template<class T > | |
MaskedArray< T > | atan (const MaskedArray< T > &left) |
template<class T > | |
MaskedArray< T > | sinh (const MaskedArray< T > &left) |
template<class T > | |
MaskedArray< T > | cosh (const MaskedArray< T > &left) |
template<class T > | |
MaskedArray< T > | tanh (const MaskedArray< T > &left) |
template<class T > | |
MaskedArray< T > | exp (const MaskedArray< T > &left) |
template<class T > | |
MaskedArray< T > | log (const MaskedArray< T > &left) |
template<class T > | |
MaskedArray< T > | log10 (const MaskedArray< T > &left) |
template<class T > | |
MaskedArray< T > | sqrt (const MaskedArray< T > &left) |
template<class T > | |
MaskedArray< T > | abs (const MaskedArray< T > &left) |
template<class T > | |
MaskedArray< T > | fabs (const MaskedArray< T > &left) |
template<class T > | |
MaskedArray< T > | ceil (const MaskedArray< T > &left) |
template<class T > | |
MaskedArray< T > | floor (const MaskedArray< T > &left) |
template<class T > | |
MaskedArray< T > | atan2 (const MaskedArray< T > &left, const Array< T > &right) |
Transcendental functions requiring two arguments applied on an element-by-element basis. | |
template<class T > | |
MaskedArray< T > | fmod (const MaskedArray< T > &left, const Array< T > &right) |
template<class T > | |
MaskedArray< T > | atan2 (const Array< T > &left, const MaskedArray< T > &right) |
template<class T > | |
MaskedArray< T > | fmod (const Array< T > &left, const MaskedArray< T > &right) |
template<class T > | |
MaskedArray< T > | atan2 (const MaskedArray< T > &left, const MaskedArray< T > &right) |
template<class T > | |
MaskedArray< T > | fmod (const MaskedArray< T > &left, const MaskedArray< T > &right) |
template<class T > | |
MaskedArray< T > | atan2 (const MaskedArray< T > &left, const T &right) |
template<class T > | |
MaskedArray< T > | fmod (const MaskedArray< T > &left, const T &right) |
template<class T > | |
MaskedArray< T > | atan2 (const T &left, const MaskedArray< T > &right) |
template<class T > | |
MaskedArray< T > | fmod (const T &left, const MaskedArray< T > &right) |
template<class T , class U > | |
MaskedArray< T > | pow (const MaskedArray< T > &left, const Array< U > &right) |
template<class T , class U > | |
MaskedArray< T > | pow (const Array< T > &left, const MaskedArray< U > &right) |
template<class T , class U > | |
MaskedArray< T > | pow (const MaskedArray< T > &left, const MaskedArray< U > &right) |
template<class T > | |
MaskedArray< T > | pow (const MaskedArray< T > &left, const Double &right) |
template<class T > | |
void | minMax (T &minVal, T &maxVal, IPosition &minPos, IPosition &maxPos, const MaskedArray< T > &marray) |
Find the minimum and maximum values of a MaskedArray. | |
template<class T > | |
void | minMax (T &minVal, T &maxVal, const MaskedArray< T > &marray) |
template<class T > | |
T | min (const MaskedArray< T > &left) |
The "min" and "max" functions require that the type "T" have comparison operators. | |
template<class T > | |
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. | |
template<class T > | |
MaskedArray< T > | min (const Array< T > &left, const MaskedArray< T > &right) |
template<class T > | |
MaskedArray< T > | min (const MaskedArray< T > &left, const MaskedArray< T > &right) |
template<class T > | |
MaskedArray< T > | min (const T &left, const MaskedArray< T > &right) |
template<class T > | |
MaskedArray< T > | min (const MaskedArray< T > &left, const T &right) |
template<class T > | |
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. | |
template<class T > | |
T | max (const MaskedArray< T > &left) |
The maximum element of the array. | |
template<class T > | |
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. | |
template<class T > | |
MaskedArray< T > | max (const Array< T > &left, const MaskedArray< T > &right) |
template<class T > | |
MaskedArray< T > | max (const MaskedArray< T > &left, const MaskedArray< T > &right) |
template<class T > | |
MaskedArray< T > | max (const T &left, const MaskedArray< T > &right) |
template<class T > | |
MaskedArray< T > | max (const MaskedArray< T > &left, const T &right) |
template<class T > | |
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. | |
template<class T > | |
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 incrementing by "inc" for each element where the mask is True. | |
template<class T > | |
void | indgen (MaskedArray< T > &a) |
Fills all elements of "array" where the mask is True with a sequence starting with 0 and incremented by one for each element where the mask is True. | |
template<class T > | |
void | indgen (MaskedArray< T > &a, T start) |
Fills all elements of "array" where the mask is True with a sequence starting with "start" and incremented by one for each element where the mask is True. | |
template<class T > | |
T | sum (const MaskedArray< T > &a) |
template<class T > | |
T | sumsquares (const MaskedArray< T > &a) |
Sum of the squares of every element of the MaskedArray where the Mask is True. | |
template<class T > | |
T | product (const MaskedArray< T > &a) |
Product of every element of the MaskedArray where the Mask is True. | |
template<class T > | |
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". | |
template<class T > | |
T | variance (const MaskedArray< T > &a) |
The variance of "a" is the sum of (a(i) - mean(a))**2/(a.nelements() - 1). | |
template<class T > | |
T | variance (const MaskedArray< T > &a, T mean) |
The variance of "a" is the sum of (a(i) - mean(a))**2/(a.nelements() - 1). | |
template<class T > | |
T | stddev (const MaskedArray< T > &a) |
The standard deviation of "a" is the sqare root of its variance. | |
template<class T > | |
T | stddev (const MaskedArray< T > &a, T mean) |
The standard deviation of "a" is the sqare root of its variance. | |
template<class T > | |
T | avdev (const MaskedArray< T > &a) |
The average deviation of "a" is the sum of abs(a(i) - mean(a))/N. | |
template<class T > | |
T | avdev (const MaskedArray< T > &a, T mean) |
The average deviation of "a" is the sum of abs(a(i) - mean(a))/N. | |
template<class T > | |
T | rms (const MaskedArray< T > &a) |
The root-mean-square of "a" is the sqrt of sum(a*a)/N. | |
template<class T > | |
T | median (const MaskedArray< T > &a) |
The median of "a" is a(n/2). | |
template<class T > | |
T | median (const MaskedArray< T > &a, Bool sorted) |
template<class T > | |
T | median (const MaskedArray< T > &a, Bool sorted, Bool takeEvenMean) |
template<class T > | |
MaskedArray< T > | square (const MaskedArray< T > &val) |
Returns a MaskedArray where every element is squared. | |
template<class T > | |
MaskedArray< T > | cube (const MaskedArray< T > &val) |
Returns a MaskedArray where every element is cubed. |
Mathematical operations for MaskedArrays (and with Arrays)
MaskArrMath is short for MaskedArrayMath, which is too long by AIPS++ file naming conventions. This file contains global functions which perform element by element mathematical operations on masked arrays.
These functions perform element by element mathematical operations on masked arrays. With two arrays, they must both conform, and the result is done element by element, for those locations where the mask of the MaskedArray is True. For two MaskedArrays, the "and" of the masks is used.
Vector<Int> a(10); Vector<Int> b(10); Vector<Int> c(10); . . . c = a(a>0) + b(b>0);
This example sets those elements of c where ((a>0) && (b>0)) to (a+b). Elements of c where !((a>0) && (b>0)) are unchanged. The result of this operation is a MaskedArray. The assignment from this MaskedArray to the Vector c only assigns those elements where the mask is True.
This example sets those elements of c where (b>0) to atan2 (a,b). Elements of c where !(b>0) are unchanged. The result of this operation is a MaskedArray. The assignment from this MaskedArray to the Vector c only assigns those elements where the mask is True.
This example sums a, for those elements of a which are greater than 0.
One wants to be able to mask arrays and perform mathematical operations on those masked arrays. Since the masked arrays are only defined where the masks are True, the result must be a MaskedArray, or a simple number.
Definition at line 116 of file MaskArrMath.h.
MaskedArray<T> casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::abs | ( | const MaskedArray< T > & | left | ) |
MaskedArray<T> casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::acos | ( | const MaskedArray< T > & | left | ) |
MaskedArray<T> casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::asin | ( | const MaskedArray< T > & | left | ) |
MaskedArray<T> casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::atan | ( | const MaskedArray< T > & | left | ) |
MaskedArray<T> casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::atan2 | ( | const MaskedArray< T > & | left, |
const Array< T > & | right | ||
) |
Transcendental functions requiring two arguments applied on an element-by-element basis.
Although a template function, this may not make sense for all numeric types.
MaskedArray<T> casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::atan2 | ( | const Array< T > & | left, |
const MaskedArray< T > & | right | ||
) |
MaskedArray<T> casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::atan2 | ( | const MaskedArray< T > & | left, |
const MaskedArray< T > & | right | ||
) |
MaskedArray<T> casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::atan2 | ( | const MaskedArray< T > & | left, |
const T & | right | ||
) |
MaskedArray<T> casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::atan2 | ( | const T & | left, |
const MaskedArray< T > & | right | ||
) |
T casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::avdev | ( | const MaskedArray< T > & | a | ) |
The average deviation of "a" is the sum of abs(a(i) - mean(a))/N.
(N.B. N, not N-1 in the denominator).
T casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::avdev | ( | const MaskedArray< T > & | a, |
T | mean | ||
) |
The average deviation of "a" is the sum of abs(a(i) - mean(a))/N.
(N.B. N, not N-1 in the denominator). Rather than using a computed mean, use the supplied value.
MaskedArray<T> casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::ceil | ( | const MaskedArray< T > & | left | ) |
MaskedArray<T> casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::cos | ( | const MaskedArray< T > & | left | ) |
MaskedArray<T> casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::cosh | ( | const MaskedArray< T > & | left | ) |
MaskedArray<T> casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::cube | ( | const MaskedArray< T > & | val | ) |
Returns a MaskedArray where every element is cubed.
MaskedArray<T> casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::exp | ( | const MaskedArray< T > & | left | ) |
MaskedArray<T> casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::fabs | ( | const MaskedArray< T > & | left | ) |
MaskedArray<T> casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::floor | ( | const MaskedArray< T > & | left | ) |
MaskedArray<T> casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::fmod | ( | const MaskedArray< T > & | left, |
const Array< T > & | right | ||
) |
MaskedArray<T> casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::fmod | ( | const Array< T > & | left, |
const MaskedArray< T > & | right | ||
) |
MaskedArray<T> casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::fmod | ( | const MaskedArray< T > & | left, |
const MaskedArray< T > & | right | ||
) |
MaskedArray<T> casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::fmod | ( | const MaskedArray< T > & | left, |
const T & | right | ||
) |
MaskedArray<T> casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::fmod | ( | const T & | left, |
const MaskedArray< T > & | right | ||
) |
void casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::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 incrementing by "inc" for each element where the mask is True.
The first axis varies most rapidly.
void casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::indgen | ( | MaskedArray< T > & | a | ) |
Fills all elements of "array" where the mask is True with a sequence starting with 0 and incremented by one for each element where the mask is True.
The first axis varies most rapidly.
void casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::indgen | ( | MaskedArray< T > & | a, |
T | start | ||
) |
Fills all elements of "array" where the mask is True with a sequence starting with "start" and incremented by one for each element where the mask is True.
The first axis varies most rapidly.
MaskedArray<T> casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::log | ( | const MaskedArray< T > & | left | ) |
MaskedArray<T> casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::log10 | ( | const MaskedArray< T > & | left | ) |
T casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::max | ( | const MaskedArray< T > & | left | ) |
The maximum element of the array.
MaskedArray<T> casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::max | ( | const MaskedArray< T > & | left, |
const Array< T > & | right | ||
) |
Return an array that contains the maximum of "left" and "right" at each position.
"left" and "right" must be conformant.
MaskedArray<T> casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::max | ( | const Array< T > & | left, |
const MaskedArray< T > & | right | ||
) |
MaskedArray<T> casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::max | ( | const MaskedArray< T > & | left, |
const MaskedArray< T > & | right | ||
) |
MaskedArray<T> casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::max | ( | const T & | left, |
const MaskedArray< T > & | right | ||
) |
MaskedArray<T> casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::max | ( | const MaskedArray< T > & | left, |
const T & | right | ||
) |
void casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::max | ( | const MaskedArray< T > & | result, |
const Array< T > & | left, | ||
const Array< T > & | right | ||
) |
"result" contains the maximum of "left" and "right" at each position.
"result", "left", and "right" must be conformant.
T casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::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 casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::median | ( | const MaskedArray< T > & | a | ) | [inline] |
The median of "a" is a(n/2).
When a has an even number of elements and the switch takeEvenMean is set, the median is 0.5*(a(n/2) + a((n+1)/2)). According to Numerical Recipes (2nd edition) it makes little sense to take the mean when the array is large enough (> 100 elements). Therefore the default for takeEvenMean is False when the array has > 100 elements, otherwise it is True.
If "sorted"==True we assume the data is already sorted and we compute the median directly. Otherwise the function GenSort::kthLargest is used to find the median (kthLargest is about 6 times faster than a full quicksort).
Definition at line 418 of file MaskArrMath.h.
References casa::False, median(), and casa::MaskedArray< T >::nelements().
Referenced by median().
T casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::median | ( | const MaskedArray< T > & | a, |
Bool | sorted | ||
) | [inline] |
Definition at line 420 of file MaskArrMath.h.
References median(), and casa::MaskedArray< T >::nelements().
Referenced by median().
T casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::median | ( | const MaskedArray< T > & | a, |
Bool | sorted, | ||
Bool | takeEvenMean | ||
) |
T casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::min | ( | const MaskedArray< T > & | left | ) |
The "min" and "max" functions require that the type "T" have comparison operators.
The minimum element of the array.
MaskedArray<T> casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::min | ( | const MaskedArray< T > & | left, |
const Array< T > & | right | ||
) |
Return an array that contains the minimum of "left" and "right" at each position.
"left" and "right" must be conformant.
MaskedArray<T> casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::min | ( | const Array< T > & | left, |
const MaskedArray< T > & | right | ||
) |
MaskedArray<T> casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::min | ( | const MaskedArray< T > & | left, |
const MaskedArray< T > & | right | ||
) |
MaskedArray<T> casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::min | ( | const T & | left, |
const MaskedArray< T > & | right | ||
) |
MaskedArray<T> casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::min | ( | const MaskedArray< T > & | left, |
const T & | right | ||
) |
void casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::min | ( | const MaskedArray< T > & | result, |
const Array< T > & | left, | ||
const Array< T > & | right | ||
) |
"result" contains the minimum of "left" and "right" at each position.
"result", "left", and "right" must be conformant.
void casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::minMax | ( | T & | minVal, |
T & | maxVal, | ||
IPosition & | minPos, | ||
IPosition & | maxPos, | ||
const MaskedArray< T > & | marray | ||
) |
Find the minimum and maximum values of a MaskedArray.
Also find the IPositions of the minimum and maximum values.
void casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::minMax | ( | T & | minVal, |
T & | maxVal, | ||
const MaskedArray< T > & | marray | ||
) |
MaskedArray<T> casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::operator* | ( | const MaskedArray< T > & | left, |
const Array< T > & | right | ||
) |
MaskedArray<T> casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::operator* | ( | const Array< T > & | left, |
const MaskedArray< T > & | right | ||
) |
MaskedArray<T> casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::operator* | ( | const MaskedArray< T > & | left, |
const MaskedArray< T > & | right | ||
) |
MaskedArray<T> casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::operator* | ( | const MaskedArray< T > & | left, |
const T & | right | ||
) |
MaskedArray<Complex> casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::operator* | ( | const MaskedArray< Complex > & | left, |
const Float & | right | ||
) |
MaskedArray<T> casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::operator* | ( | const T & | left, |
const MaskedArray< T > & | right | ||
) |
MaskedArray<Complex> casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::operator* | ( | const Float & | left, |
const MaskedArray< Complex > & | right | ||
) |
const MaskedArray<T>& casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::operator*= | ( | const MaskedArray< T > & | left, |
const Array< T > & | other | ||
) |
Array<T>& casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::operator*= | ( | Array< T > & | left, |
const MaskedArray< T > & | other | ||
) |
const MaskedArray<T>& casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::operator*= | ( | const MaskedArray< T > & | left, |
const MaskedArray< T > & | other | ||
) |
const MaskedArray<T>& casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::operator*= | ( | const MaskedArray< T > & | left, |
const T & | other | ||
) |
MaskedArray<T> casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::operator+ | ( | const MaskedArray< T > & | a | ) |
Unary arithmetic operation.
MaskedArray<T> casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::operator+ | ( | const MaskedArray< T > & | left, |
const Array< T > & | right | ||
) |
Element by element arithmetic on MaskedArrays, returns a MaskedArray.
MaskedArray<T> casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::operator+ | ( | const Array< T > & | left, |
const MaskedArray< T > & | right | ||
) |
MaskedArray<T> casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::operator+ | ( | const MaskedArray< T > & | left, |
const MaskedArray< T > & | right | ||
) |
MaskedArray<T> casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::operator+ | ( | const MaskedArray< T > & | left, |
const T & | right | ||
) |
Element by element arithmetic between a MaskedArray and a scalar, returning a MaskedArray.
MaskedArray<T> casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::operator+ | ( | const T & | left, |
const MaskedArray< T > & | right | ||
) |
Element by element arithmetic between a scalar and a MaskedArray, returning a MaskedArray.
const MaskedArray<T>& casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::operator+= | ( | const MaskedArray< T > & | left, |
const Array< T > & | other | ||
) |
Element by element arithmetic modifying left in-place.
left and other must be conformant.
Array<T>& casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::operator+= | ( | Array< T > & | left, |
const MaskedArray< T > & | other | ||
) |
const MaskedArray<T>& casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::operator+= | ( | const MaskedArray< T > & | left, |
const MaskedArray< T > & | other | ||
) |
const MaskedArray<T>& casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::operator+= | ( | const MaskedArray< T > & | left, |
const T & | other | ||
) |
Element by element arithmetic modifying left in-place.
The scalar "other" behaves as if it were a conformant Array to left filled with constant values.
MaskedArray<T> casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::operator- | ( | const MaskedArray< T > & | a | ) |
MaskedArray<T> casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::operator- | ( | const MaskedArray< T > & | left, |
const Array< T > & | right | ||
) |
MaskedArray<T> casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::operator- | ( | const Array< T > & | left, |
const MaskedArray< T > & | right | ||
) |
MaskedArray<T> casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::operator- | ( | const MaskedArray< T > & | left, |
const MaskedArray< T > & | right | ||
) |
MaskedArray<T> casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::operator- | ( | const MaskedArray< T > & | left, |
const T & | right | ||
) |
MaskedArray<T> casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::operator- | ( | const T & | left, |
const MaskedArray< T > & | right | ||
) |
const MaskedArray<T>& casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::operator-= | ( | const MaskedArray< T > & | left, |
const Array< T > & | other | ||
) |
Array<T>& casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::operator-= | ( | Array< T > & | left, |
const MaskedArray< T > & | other | ||
) |
const MaskedArray<T>& casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::operator-= | ( | const MaskedArray< T > & | left, |
const MaskedArray< T > & | other | ||
) |
const MaskedArray<T>& casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::operator-= | ( | const MaskedArray< T > & | left, |
const T & | other | ||
) |
MaskedArray<T> casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::operator/ | ( | const MaskedArray< T > & | left, |
const Array< T > & | right | ||
) |
MaskedArray<T> casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::operator/ | ( | const Array< T > & | left, |
const MaskedArray< T > & | right | ||
) |
MaskedArray<T> casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::operator/ | ( | const MaskedArray< T > & | left, |
const MaskedArray< T > & | right | ||
) |
MaskedArray<T> casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::operator/ | ( | const MaskedArray< T > & | left, |
const T & | right | ||
) |
MaskedArray<T> casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::operator/ | ( | const T & | left, |
const MaskedArray< T > & | right | ||
) |
const MaskedArray<T>& casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::operator/= | ( | const MaskedArray< T > & | left, |
const Array< T > & | other | ||
) |
Array<T>& casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::operator/= | ( | Array< T > & | left, |
const MaskedArray< T > & | other | ||
) |
const MaskedArray<T>& casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::operator/= | ( | const MaskedArray< T > & | left, |
const MaskedArray< T > & | other | ||
) |
const MaskedArray<T>& casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::operator/= | ( | const MaskedArray< T > & | left, |
const MaskedArray< S > & | other | ||
) |
const MaskedArray<T>& casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::operator/= | ( | const MaskedArray< T > & | left, |
const T & | other | ||
) |
MaskedArray<T> casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::pow | ( | const MaskedArray< T > & | left, |
const Array< U > & | right | ||
) |
MaskedArray<T> casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::pow | ( | const Array< T > & | left, |
const MaskedArray< U > & | right | ||
) |
MaskedArray<T> casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::pow | ( | const MaskedArray< T > & | left, |
const MaskedArray< U > & | right | ||
) |
MaskedArray<T> casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::pow | ( | const MaskedArray< T > & | left, |
const Double & | right | ||
) |
T casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::product | ( | const MaskedArray< T > & | a | ) |
Product of every element of the MaskedArray where the Mask is True.
This could of course easily overflow.
T casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::rms | ( | const MaskedArray< T > & | a | ) |
The root-mean-square of "a" is the sqrt of sum(a*a)/N.
MaskedArray<T> casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::sin | ( | const MaskedArray< T > & | left | ) |
Transcendental function applied to the array on an element-by-element basis.
Although a template function, this may not make sense for all numeric types.
MaskedArray<T> casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::sinh | ( | const MaskedArray< T > & | left | ) |
MaskedArray<T> casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::sqrt | ( | const MaskedArray< T > & | left | ) |
MaskedArray<T> casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::square | ( | const MaskedArray< T > & | val | ) |
Returns a MaskedArray where every element is squared.
T casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::stddev | ( | const MaskedArray< T > & | a | ) |
The standard deviation of "a" is the sqare root of its variance.
T casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::stddev | ( | const MaskedArray< T > & | a, |
T | mean | ||
) |
The standard deviation of "a" is the sqare root of its variance.
Rather than using a computed mean, use the supplied value.
T casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::sum | ( | const MaskedArray< T > & | a | ) |
T casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::sumsquares | ( | const MaskedArray< T > & | a | ) |
Sum of the squares of every element of the MaskedArray where the Mask is True.
MaskedArray<T> casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::tan | ( | const MaskedArray< T > & | left | ) |
MaskedArray<T> casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::tanh | ( | const MaskedArray< T > & | left | ) |
T casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::variance | ( | const MaskedArray< T > & | a | ) |
The variance of "a" is the sum of (a(i) - mean(a))**2/(a.nelements() - 1).
N.B. N-1, not N in the denominator).
T casa::MaskArrMath_global_functions_MaskedArray_mathematical_operations::variance | ( | const MaskedArray< T > & | a, |
T | mean | ||
) |
The variance of "a" is the sum of (a(i) - mean(a))**2/(a.nelements() - 1).
N.B. N-1, not N in the denominator). Rather than using a computed mean, use the supplied value.