casacore
|
Logical operations for MArray objects. More...
#include <MArrayLogical.h>
Classes | |
class | MAllFunc |
class | MAnyFunc |
class | MNFalseFunc |
class | MNTrueFunc |
Define functors to perform a reduction function on an MArray object. More... | |
Public Member Functions | |
template<typename T > | |
MArray< Bool > | operator== (const MArray< T > &left, const MArray< T > &right) |
Define comparison functions between 2 MArray objects and between MArray object and scalar. More... | |
template<typename T > | |
MArray< Bool > | operator<= (const MArray< T > &left, const MArray< T > &right) |
template<typename T > | |
MArray< Bool > | operator< (const MArray< T > &left, const MArray< T > &right) |
template<typename T > | |
MArray< Bool > | operator>= (const MArray< T > &left, const MArray< T > &right) |
template<typename T > | |
MArray< Bool > | operator> (const MArray< T > &left, const MArray< T > &right) |
template<typename T > | |
MArray< Bool > | operator!= (const MArray< T > &left, const MArray< T > &right) |
template<typename T > | |
MArray< Bool > | operator|| (const MArray< T > &left, const MArray< T > &right) |
template<typename T > | |
MArray< Bool > | operator&& (const MArray< T > &left, const MArray< T > &right) |
template<typename T > | |
MArray< Bool > | operator== (const MArray< T > &left, const T &right) |
template<typename T > | |
MArray< Bool > | operator<= (const MArray< T > &left, const T &right) |
template<typename T > | |
MArray< Bool > | operator< (const MArray< T > &left, const T &right) |
template<typename T > | |
MArray< Bool > | operator>= (const MArray< T > &left, const T &right) |
template<typename T > | |
MArray< Bool > | operator> (const MArray< T > &left, const T &right) |
template<typename T > | |
MArray< Bool > | operator!= (const MArray< T > &left, const T &right) |
template<typename T > | |
MArray< Bool > | operator|| (const MArray< T > &left, const T &right) |
template<typename T > | |
MArray< Bool > | operator&& (const MArray< T > &left, const T &right) |
template<typename T > | |
MArray< Bool > | operator== (const T &left, const MArray< T > &right) |
template<typename T > | |
MArray< Bool > | operator<= (const T &left, const MArray< T > &right) |
template<typename T > | |
MArray< Bool > | operator< (const T &left, const MArray< T > &right) |
template<typename T > | |
MArray< Bool > | operator>= (const T &left, const MArray< T > &right) |
template<typename T > | |
MArray< Bool > | operator> (const T &left, const MArray< T > &right) |
template<typename T > | |
MArray< Bool > | operator!= (const T &left, const MArray< T > &right) |
template<typename T > | |
MArray< Bool > | operator|| (const T &left, const MArray< T > &right) |
The logical OR of 2 MArray objects (normally Bool type) More... | |
template<typename T > | |
MArray< Bool > | operator&& (const T &left, const MArray< T > &right) |
The logical AND of 2 MArray objects (normally Bool type). More... | |
template<typename T > | |
MArray< Bool > | operator! (const MArray< T > &a) |
The logical NOT of an MArray object (normally Bool type). More... | |
template<typename T > | |
MArray< Bool > | near (const MArray< T > &left, const MArray< T > &right, Double tol) |
Compare with a given relative or absolute tolerance. More... | |
template<typename T > | |
MArray< Bool > | nearAbs (const MArray< T > &left, const MArray< T > &right, Double tol) |
template<typename T > | |
MArray< Bool > | near (const MArray< T > &left, const T &right, Double tol) |
template<typename T > | |
MArray< Bool > | nearAbs (const MArray< T > &left, const T &right, Double tol) |
template<typename T > | |
MArray< Bool > | near (const T &left, const MArray< T > &right, Double tol) |
template<typename T > | |
MArray< Bool > | nearAbs (const T &left, const MArray< T > &right, Double tol) |
template<typename T > | |
MArray< Bool > | isNaN (const MArray< T > &arr) |
Test which elements are NaN. More... | |
template<typename T > | |
MArray< Bool > | isInf (const MArray< T > &arr) |
Test which elements are infinite. More... | |
template<typename T > | |
MArray< Bool > | isFinite (const MArray< T > &arr) |
Test which elements have a finite value. More... | |
template<typename T > | |
Bool | allEQ (const MArray< T > &left, const MArray< T > &right) |
Are all unmasked elements equal? The result is True if there are no unmasked elements. More... | |
template<typename T > | |
Bool | allEQ (const MArray< T > &array, const T &value) |
template<typename T > | |
Bool | allEQ (const T &value, const MArray< T > &array) |
template<typename T > | |
Bool | anyEQ (const MArray< T > &left, const MArray< T > &right) |
Is any unmasked element equal? The result is False if there are no unmasked elements. More... | |
template<typename T > | |
Bool | anyEQ (const MArray< T > &array, const T &value) |
template<typename T > | |
Bool | anyEQ (const T &value, const MArray< T > &array) |
Bool | allTrue (const MArray< Bool > &array) |
Are all unmasked elements true? More... | |
Bool | anyTrue (const MArray< Bool > &array) |
Is any unmasked element true? More... | |
template<typename T > | |
size_t | ntrue (const MArray< T > &a) |
Count the number of unmasked elements that are True. More... | |
template<typename T > | |
size_t | nfalse (const MArray< T > &a) |
Count the number of unmasked elements that are False. More... | |
template<typename T > | |
MArray< size_t > | partialNTrue (const MArray< T > &a, const IPosition &collapseAxes) |
Get partial ntrues. More... | |
template<typename T > | |
MArray< size_t > | partialNFalse (const MArray< T > &a, const IPosition &collapseAxes) |
Get partial nfalses. More... | |
template<typename T > | |
MArray< Bool > | partialAlls (const MArray< T > &a, const IPosition &collapseAxes) |
Get partial all. More... | |
template<typename T > | |
MArray< Bool > | partialAnys (const MArray< T > &a, const IPosition &collapseAxes) |
Get partial any. More... | |
template<typename T > | |
MArray< uInt > | slidingNTrue (const MArray< T > &a, const IPosition &halfBoxSize, Bool fillEdge=True) |
Get sliding ntrues. More... | |
template<typename T > | |
MArray< uInt > | slidingNFalse (const MArray< T > &a, const IPosition &halfBoxSize, Bool fillEdge=True) |
Get sliding nfalses. More... | |
template<typename T > | |
MArray< Bool > | slidingAlls (const MArray< T > &a, const IPosition &halfBoxSize, Bool fillEdge=True) |
Get sliding all. More... | |
template<typename T > | |
MArray< Bool > | slidingAnys (const MArray< T > &a, const IPosition &halfBoxSize, Bool fillEdge=True) |
Get sliding any. More... | |
template<typename T > | |
MArray< uInt > | boxedNTrue (const MArray< T > &a, const IPosition &boxSize) |
Get boxed ntrues. More... | |
template<typename T > | |
MArray< uInt > | boxedNFalse (const MArray< T > &a, const IPosition &boxSize) |
Get boxed nfalses. More... | |
template<typename T > | |
MArray< Bool > | boxedAlls (const MArray< T > &a, const IPosition &boxSize) |
Get boxed all. More... | |
template<typename T > | |
MArray< Bool > | boxedAnys (const MArray< T > &a, const IPosition &boxSize) |
Get boxed any. More... | |
Logical operations for MArray objects.
These functions perform element by element logical operations on optionally masked arrays and/or scalars. If two arrays are used, the arrays must conform, except for allEQ which returns False if the arrays do not conform.
The functions in this file can be divided in 3 groups:
Definition at line 92 of file MArrayLogical.h.
|
inline |
Are all unmasked elements equal? The result is True if there are no unmasked elements.
Definition at line 302 of file MArrayLogical.h.
References casacore::MArray< T >::array(), casacore::Array< T, Alloc >::begin(), casacore::Array< T, Alloc >::end(), casacore::False, casacore::MArrayBase::hasMask(), casacore::MArrayBase::isNull(), and casacore::MArrayBase::mask().
|
inline |
Definition at line 323 of file MArrayLogical.h.
References casacore::MArray< T >::array(), casacore::Array< T, Alloc >::begin(), casacore::Array< T, Alloc >::end(), casacore::False, casacore::MArrayBase::hasMask(), casacore::MArrayBase::isNull(), casacore::MArrayBase::mask(), and casacore::value().
|
inline |
Definition at line 331 of file MArrayLogical.h.
|
inline |
Are all unmasked elements true?
Definition at line 373 of file MArrayLogical.h.
References casacore::True.
|
inline |
Is any unmasked element equal? The result is False if there are no unmasked elements.
Definition at line 339 of file MArrayLogical.h.
References casacore::anyEQ(), casacore::MArray< T >::array(), casacore::Array< T, Alloc >::begin(), casacore::Array< T, Alloc >::end(), casacore::False, casacore::MArrayBase::hasMask(), casacore::MArrayBase::isNull(), and casacore::MArrayBase::mask().
|
inline |
Definition at line 360 of file MArrayLogical.h.
References casacore::anyEQ(), casacore::MArray< T >::array(), casacore::Array< T, Alloc >::begin(), casacore::Array< T, Alloc >::end(), casacore::False, casacore::MArrayBase::hasMask(), casacore::MArrayBase::isNull(), casacore::MArrayBase::mask(), and casacore::value().
|
inline |
Definition at line 368 of file MArrayLogical.h.
References casacore::anyEQ().
|
inline |
Is any unmasked element true?
Definition at line 377 of file MArrayLogical.h.
References casacore::anyEQ(), and casacore::True.
|
inline |
Get boxed all.
Definition at line 571 of file MArrayLogical.h.
References casacore::MArray< T >::array(), casacore::boxedArrayMath(), casacore::MArrayBase::hasMask(), and casacore::MArrayBase::isNull().
|
inline |
Get boxed any.
Definition at line 587 of file MArrayLogical.h.
References casacore::MArray< T >::array(), casacore::boxedArrayMath(), casacore::MArrayBase::hasMask(), and casacore::MArrayBase::isNull().
|
inline |
Get boxed nfalses.
Definition at line 555 of file MArrayLogical.h.
References casacore::MArray< T >::array(), casacore::boxedArrayMath(), casacore::MArrayBase::hasMask(), and casacore::MArrayBase::isNull().
|
inline |
Get boxed ntrues.
Definition at line 539 of file MArrayLogical.h.
References casacore::MArray< T >::array(), casacore::boxedArrayMath(), casacore::MArrayBase::hasMask(), and casacore::MArrayBase::isNull().
|
inline |
Test which elements have a finite value.
Definition at line 294 of file MArrayLogical.h.
References casacore::MArray< T >::array(), and casacore::isFinite().
|
inline |
Test which elements are infinite.
Definition at line 289 of file MArrayLogical.h.
References casacore::MArray< T >::array(), and casacore::isInf().
|
inline |
Test which elements are NaN.
Definition at line 284 of file MArrayLogical.h.
References casacore::MArray< T >::array(), and casacore::isNaN().
|
inline |
Compare with a given relative or absolute tolerance.
Definition at line 247 of file MArrayLogical.h.
References casacore::MArray< T >::array(), casacore::MArrayBase::combineMask(), casacore::MArrayBase::isNull(), and casacore::near().
|
inline |
Definition at line 261 of file MArrayLogical.h.
References casacore::MArray< T >::array(), and casacore::near().
|
inline |
Definition at line 271 of file MArrayLogical.h.
References casacore::MArray< T >::array(), and casacore::near().
|
inline |
Definition at line 254 of file MArrayLogical.h.
References casacore::MArray< T >::array(), casacore::MArrayBase::combineMask(), casacore::MArrayBase::isNull(), and casacore::nearAbs().
|
inline |
Definition at line 266 of file MArrayLogical.h.
References casacore::MArray< T >::array(), and casacore::nearAbs().
|
inline |
Definition at line 276 of file MArrayLogical.h.
References casacore::MArray< T >::array(), and casacore::nearAbs().
|
inline |
Count the number of unmasked elements that are False.
Definition at line 396 of file MArrayLogical.h.
References casacore::MArray< T >::array(), casacore::Array< T, Alloc >::begin(), casacore::Array< T, Alloc >::cbegin(), casacore::Array< T, Alloc >::cend(), casacore::ArrayBase::contiguousStorage(), casacore::Array< T, Alloc >::end(), casacore::MArrayBase::hasMask(), casacore::MArrayBase::mask(), and casacore::nfalse().
|
inline |
Count the number of unmasked elements that are True.
Definition at line 382 of file MArrayLogical.h.
References casacore::MArray< T >::array(), casacore::Array< T, Alloc >::begin(), casacore::Array< T, Alloc >::cbegin(), casacore::Array< T, Alloc >::cend(), casacore::ArrayBase::contiguousStorage(), casacore::Array< T, Alloc >::end(), casacore::MArrayBase::hasMask(), casacore::MArrayBase::mask(), and casacore::ntrue().
|
inline |
The logical NOT of an MArray object (normally Bool type).
Definition at line 240 of file MArrayLogical.h.
References casacore::MArray< T >::array().
|
inline |
Definition at line 154 of file MArrayLogical.h.
References casacore::MArray< T >::array(), casacore::MArrayBase::combineMask(), and casacore::MArrayBase::isNull().
|
inline |
Definition at line 192 of file MArrayLogical.h.
References casacore::MArray< T >::array().
|
inline |
Definition at line 224 of file MArrayLogical.h.
References casacore::MArray< T >::array().
|
inline |
Definition at line 166 of file MArrayLogical.h.
References casacore::MArray< T >::array(), casacore::MArrayBase::combineMask(), and casacore::MArrayBase::isNull().
|
inline |
Definition at line 200 of file MArrayLogical.h.
References casacore::MArray< T >::array().
|
inline |
The logical AND of 2 MArray objects (normally Bool type).
Definition at line 235 of file MArrayLogical.h.
References casacore::MArray< T >::array().
|
inline |
Definition at line 136 of file MArrayLogical.h.
|
inline |
Definition at line 180 of file MArrayLogical.h.
|
inline |
Definition at line 212 of file MArrayLogical.h.
|
inline |
Definition at line 130 of file MArrayLogical.h.
|
inline |
Definition at line 176 of file MArrayLogical.h.
|
inline |
Definition at line 208 of file MArrayLogical.h.
|
inline |
Define comparison functions between 2 MArray objects and between MArray object and scalar.
Definition at line 124 of file MArrayLogical.h.
References casacore::MArray< T >::array(), casacore::MArrayBase::combineMask(), and casacore::MArrayBase::isNull().
|
inline |
Definition at line 172 of file MArrayLogical.h.
References casacore::MArray< T >::array().
|
inline |
Definition at line 204 of file MArrayLogical.h.
References casacore::MArray< T >::array().
|
inline |
Definition at line 148 of file MArrayLogical.h.
References casacore::MArray< T >::array(), casacore::MArrayBase::combineMask(), and casacore::MArrayBase::isNull().
|
inline |
Definition at line 188 of file MArrayLogical.h.
References casacore::MArray< T >::array().
|
inline |
Definition at line 220 of file MArrayLogical.h.
References casacore::MArray< T >::array().
|
inline |
Definition at line 142 of file MArrayLogical.h.
References casacore::MArray< T >::array(), casacore::MArrayBase::combineMask(), and casacore::MArrayBase::isNull().
|
inline |
Definition at line 184 of file MArrayLogical.h.
References casacore::MArray< T >::array().
|
inline |
Definition at line 216 of file MArrayLogical.h.
References casacore::MArray< T >::array().
|
inline |
Definition at line 160 of file MArrayLogical.h.
References casacore::MArray< T >::array(), casacore::MArrayBase::combineMask(), and casacore::MArrayBase::isNull().
|
inline |
Definition at line 196 of file MArrayLogical.h.
References casacore::MArray< T >::array().
|
inline |
The logical OR of 2 MArray objects (normally Bool type)
Definition at line 230 of file MArrayLogical.h.
References casacore::MArray< T >::array().
|
inline |
Get partial all.
Definition at line 439 of file MArrayLogical.h.
References casacore::MArray< T >::array(), casacore::MArrayBase::hasMask(), and casacore::MArrayBase::isNull().
|
inline |
Get partial any.
Definition at line 455 of file MArrayLogical.h.
References casacore::MArray< T >::array(), casacore::MArrayBase::hasMask(), and casacore::MArrayBase::isNull().
|
inline |
Get partial nfalses.
Definition at line 425 of file MArrayLogical.h.
References casacore::MArray< T >::array(), casacore::MArrayBase::hasMask(), and casacore::MArrayBase::isNull().
|
inline |
Get partial ntrues.
Definition at line 411 of file MArrayLogical.h.
References casacore::MArray< T >::array(), casacore::MArrayBase::hasMask(), and casacore::MArrayBase::isNull().
|
inline |
Get sliding all.
Definition at line 506 of file MArrayLogical.h.
References casacore::MArray< T >::array(), casacore::MArrayBase::hasMask(), casacore::MArrayBase::isNull(), and casacore::slidingArrayMath().
|
inline |
Get sliding any.
Definition at line 522 of file MArrayLogical.h.
References casacore::MArray< T >::array(), casacore::MArrayBase::hasMask(), casacore::MArrayBase::isNull(), and casacore::slidingArrayMath().
|
inline |
Get sliding nfalses.
Definition at line 489 of file MArrayLogical.h.
References casacore::MArray< T >::array(), casacore::MArrayBase::hasMask(), casacore::MArrayBase::isNull(), and casacore::slidingArrayMath().
|
inline |
Get sliding ntrues.
Definition at line 472 of file MArrayLogical.h.
References casacore::MArray< T >::array(), casacore::MArrayBase::hasMask(), casacore::MArrayBase::isNull(), and casacore::slidingArrayMath().