casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Member Functions | List of all members
casacore::MArrayLogical_global_functions_MArray_logical_operations Struct Reference

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< Booloperator== (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< Booloperator<= (const MArray< T > &left, const MArray< T > &right)
 
template<typename T >
MArray< Booloperator< (const MArray< T > &left, const MArray< T > &right)
 
template<typename T >
MArray< Booloperator>= (const MArray< T > &left, const MArray< T > &right)
 
template<typename T >
MArray< Booloperator> (const MArray< T > &left, const MArray< T > &right)
 
template<typename T >
MArray< Booloperator!= (const MArray< T > &left, const MArray< T > &right)
 
template<typename T >
MArray< Booloperator|| (const MArray< T > &left, const MArray< T > &right)
 
template<typename T >
MArray< Booloperator&& (const MArray< T > &left, const MArray< T > &right)
 
template<typename T >
MArray< Booloperator== (const MArray< T > &left, const T &right)
 
template<typename T >
MArray< Booloperator<= (const MArray< T > &left, const T &right)
 
template<typename T >
MArray< Booloperator< (const MArray< T > &left, const T &right)
 
template<typename T >
MArray< Booloperator>= (const MArray< T > &left, const T &right)
 
template<typename T >
MArray< Booloperator> (const MArray< T > &left, const T &right)
 
template<typename T >
MArray< Booloperator!= (const MArray< T > &left, const T &right)
 
template<typename T >
MArray< Booloperator|| (const MArray< T > &left, const T &right)
 
template<typename T >
MArray< Booloperator&& (const MArray< T > &left, const T &right)
 
template<typename T >
MArray< Booloperator== (const T &left, const MArray< T > &right)
 
template<typename T >
MArray< Booloperator<= (const T &left, const MArray< T > &right)
 
template<typename T >
MArray< Booloperator< (const T &left, const MArray< T > &right)
 
template<typename T >
MArray< Booloperator>= (const T &left, const MArray< T > &right)
 
template<typename T >
MArray< Booloperator> (const T &left, const MArray< T > &right)
 
template<typename T >
MArray< Booloperator!= (const T &left, const MArray< T > &right)
 
template<typename T >
MArray< Booloperator|| (const T &left, const MArray< T > &right)
 The logical OR of 2 MArray objects (normally Bool type) More...
 
template<typename T >
MArray< Booloperator&& (const T &left, const MArray< T > &right)
 The logical AND of 2 MArray objects (normally Bool type). More...
 
template<typename T >
MArray< Booloperator! (const MArray< T > &a)
 The logical NOT of an MArray object (normally Bool type). More...
 
template<typename T >
MArray< Boolnear (const MArray< T > &left, const MArray< T > &right, Double tol)
 Compare with a given relative or absolute tolerance. More...
 
template<typename T >
MArray< BoolnearAbs (const MArray< T > &left, const MArray< T > &right, Double tol)
 
template<typename T >
MArray< Boolnear (const MArray< T > &left, const T &right, Double tol)
 
template<typename T >
MArray< BoolnearAbs (const MArray< T > &left, const T &right, Double tol)
 
template<typename T >
MArray< Boolnear (const T &left, const MArray< T > &right, Double tol)
 
template<typename T >
MArray< BoolnearAbs (const T &left, const MArray< T > &right, Double tol)
 
template<typename T >
MArray< BoolisNaN (const MArray< T > &arr)
 Test which elements are NaN. More...
 
template<typename T >
MArray< BoolisInf (const MArray< T > &arr)
 Test which elements are infinite. More...
 
template<typename T >
MArray< BoolisFinite (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< uIntpartialNTrue (const MArray< T > &a, const IPosition &collapseAxes)
 Get partial ntrues. More...
 
template<typename T >
MArray< uIntpartialNFalse (const MArray< T > &a, const IPosition &collapseAxes)
 Get partial nfalses. More...
 
template<typename T >
MArray< BoolpartialAlls (const MArray< T > &a, const IPosition &collapseAxes)
 Get partial all. More...
 
template<typename T >
MArray< BoolpartialAnys (const MArray< T > &a, const IPosition &collapseAxes)
 Get partial any. More...
 
template<typename T >
MArray< uIntslidingNTrue (const MArray< T > &a, const IPosition &halfBoxSize, Bool fillEdge=True)
 Get sliding ntrues. More...
 
template<typename T >
MArray< uIntslidingNFalse (const MArray< T > &a, const IPosition &halfBoxSize, Bool fillEdge=True)
 Get sliding nfalses. More...
 
template<typename T >
MArray< BoolslidingAlls (const MArray< T > &a, const IPosition &halfBoxSize, Bool fillEdge=True)
 Get sliding all. More...
 
template<typename T >
MArray< BoolslidingAnys (const MArray< T > &a, const IPosition &halfBoxSize, Bool fillEdge=True)
 Get sliding any. More...
 
template<typename T >
MArray< uIntboxedNTrue (const MArray< T > &a, const IPosition &boxSize)
 Get boxed ntrues. More...
 
template<typename T >
MArray< uIntboxedNFalse (const MArray< T > &a, const IPosition &boxSize)
 Get boxed nfalses. More...
 
template<typename T >
MArray< BoolboxedAlls (const MArray< T > &a, const IPosition &boxSize)
 Get boxed all. More...
 
template<typename T >
MArray< BoolboxedAnys (const MArray< T > &a, const IPosition &boxSize)
 Get boxed any. More...
 

Detailed Description

Logical operations for MArray objects.

Review Status

Reviewed By:
UNKNOWN
Test programs:
tMArrayMath

Prerequisite

Synopsis

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.

Member Function Documentation

template<typename T >
Bool casacore::MArrayLogical_global_functions_MArray_logical_operations::allEQ ( const MArray< T > &  left,
const MArray< T > &  right 
)
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 >::begin(), casacore::False, casacore::MArrayBase::hasMask(), casacore::MArrayBase::isNull(), and casacore::MArrayBase::mask().

template<typename T >
Bool casacore::MArrayLogical_global_functions_MArray_logical_operations::allEQ ( const MArray< T > &  array,
const T &  value 
)
inline
template<typename T >
Bool casacore::MArrayLogical_global_functions_MArray_logical_operations::allEQ ( const T &  value,
const MArray< T > &  array 
)
inline

Definition at line 331 of file MArrayLogical.h.

Bool casacore::MArrayLogical_global_functions_MArray_logical_operations::allTrue ( const MArray< Bool > &  array)
inline

Are all unmasked elements true?

Definition at line 373 of file MArrayLogical.h.

References casacore::True.

template<typename T >
Bool casacore::MArrayLogical_global_functions_MArray_logical_operations::anyEQ ( const MArray< T > &  left,
const MArray< T > &  right 
)
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 >::begin(), casacore::False, casacore::MArrayBase::hasMask(), casacore::MArrayBase::isNull(), and casacore::MArrayBase::mask().

template<typename T >
Bool casacore::MArrayLogical_global_functions_MArray_logical_operations::anyEQ ( const MArray< T > &  array,
const T &  value 
)
inline
template<typename T >
Bool casacore::MArrayLogical_global_functions_MArray_logical_operations::anyEQ ( const T &  value,
const MArray< T > &  array 
)
inline

Definition at line 368 of file MArrayLogical.h.

References casacore::anyEQ().

Bool casacore::MArrayLogical_global_functions_MArray_logical_operations::anyTrue ( const MArray< Bool > &  array)
inline

Is any unmasked element true?

Definition at line 377 of file MArrayLogical.h.

References casacore::anyEQ(), and casacore::True.

template<typename T >
MArray<Bool> casacore::MArrayLogical_global_functions_MArray_logical_operations::boxedAlls ( const MArray< T > &  a,
const IPosition boxSize 
)
inline
template<typename T >
MArray<Bool> casacore::MArrayLogical_global_functions_MArray_logical_operations::boxedAnys ( const MArray< T > &  a,
const IPosition boxSize 
)
inline
template<typename T >
MArray<uInt> casacore::MArrayLogical_global_functions_MArray_logical_operations::boxedNFalse ( const MArray< T > &  a,
const IPosition boxSize 
)
inline
template<typename T >
MArray<uInt> casacore::MArrayLogical_global_functions_MArray_logical_operations::boxedNTrue ( const MArray< T > &  a,
const IPosition boxSize 
)
inline
template<typename T >
MArray<Bool> casacore::MArrayLogical_global_functions_MArray_logical_operations::isFinite ( const MArray< T > &  arr)
inline

Test which elements have a finite value.

Definition at line 294 of file MArrayLogical.h.

References casacore::MArray< T >::array(), and casacore::isFinite().

template<typename T >
MArray<Bool> casacore::MArrayLogical_global_functions_MArray_logical_operations::isInf ( const MArray< T > &  arr)
inline

Test which elements are infinite.

Definition at line 289 of file MArrayLogical.h.

References casacore::MArray< T >::array(), and casacore::isInf().

template<typename T >
MArray<Bool> casacore::MArrayLogical_global_functions_MArray_logical_operations::isNaN ( const MArray< T > &  arr)
inline

Test which elements are NaN.

Definition at line 284 of file MArrayLogical.h.

References casacore::MArray< T >::array(), and casacore::isNaN().

template<typename T >
MArray<Bool> casacore::MArrayLogical_global_functions_MArray_logical_operations::near ( const MArray< T > &  left,
const MArray< T > &  right,
Double  tol 
)
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().

template<typename T >
MArray<Bool> casacore::MArrayLogical_global_functions_MArray_logical_operations::near ( const MArray< T > &  left,
const T &  right,
Double  tol 
)
inline

Definition at line 261 of file MArrayLogical.h.

References casacore::MArray< T >::array(), and casacore::near().

template<typename T >
MArray<Bool> casacore::MArrayLogical_global_functions_MArray_logical_operations::near ( const T &  left,
const MArray< T > &  right,
Double  tol 
)
inline

Definition at line 271 of file MArrayLogical.h.

References casacore::MArray< T >::array(), and casacore::near().

template<typename T >
MArray<Bool> casacore::MArrayLogical_global_functions_MArray_logical_operations::nearAbs ( const MArray< T > &  left,
const MArray< T > &  right,
Double  tol 
)
inline
template<typename T >
MArray<Bool> casacore::MArrayLogical_global_functions_MArray_logical_operations::nearAbs ( const MArray< T > &  left,
const T &  right,
Double  tol 
)
inline

Definition at line 266 of file MArrayLogical.h.

References casacore::MArray< T >::array(), and casacore::nearAbs().

template<typename T >
MArray<Bool> casacore::MArrayLogical_global_functions_MArray_logical_operations::nearAbs ( const T &  left,
const MArray< T > &  right,
Double  tol 
)
inline

Definition at line 276 of file MArrayLogical.h.

References casacore::MArray< T >::array(), and casacore::nearAbs().

template<typename T >
size_t casacore::MArrayLogical_global_functions_MArray_logical_operations::nfalse ( const MArray< T > &  a)
inline
template<typename T >
size_t casacore::MArrayLogical_global_functions_MArray_logical_operations::ntrue ( const MArray< T > &  a)
inline
template<typename T >
MArray<Bool> casacore::MArrayLogical_global_functions_MArray_logical_operations::operator! ( const MArray< T > &  a)
inline

The logical NOT of an MArray object (normally Bool type).

Definition at line 240 of file MArrayLogical.h.

References casacore::MArray< T >::array().

template<typename T >
MArray<Bool> casacore::MArrayLogical_global_functions_MArray_logical_operations::operator!= ( const MArray< T > &  left,
const MArray< T > &  right 
)
inline
template<typename T >
MArray<Bool> casacore::MArrayLogical_global_functions_MArray_logical_operations::operator!= ( const MArray< T > &  left,
const T &  right 
)
inline

Definition at line 192 of file MArrayLogical.h.

References casacore::MArray< T >::array().

template<typename T >
MArray<Bool> casacore::MArrayLogical_global_functions_MArray_logical_operations::operator!= ( const T &  left,
const MArray< T > &  right 
)
inline

Definition at line 224 of file MArrayLogical.h.

References casacore::MArray< T >::array().

template<typename T >
MArray<Bool> casacore::MArrayLogical_global_functions_MArray_logical_operations::operator&& ( const MArray< T > &  left,
const MArray< T > &  right 
)
inline
template<typename T >
MArray<Bool> casacore::MArrayLogical_global_functions_MArray_logical_operations::operator&& ( const MArray< T > &  left,
const T &  right 
)
inline

Definition at line 200 of file MArrayLogical.h.

References casacore::MArray< T >::array().

template<typename T >
MArray<Bool> casacore::MArrayLogical_global_functions_MArray_logical_operations::operator&& ( const T &  left,
const MArray< T > &  right 
)
inline

The logical AND of 2 MArray objects (normally Bool type).

Definition at line 235 of file MArrayLogical.h.

References casacore::MArray< T >::array().

template<typename T >
MArray<Bool> casacore::MArrayLogical_global_functions_MArray_logical_operations::operator< ( const MArray< T > &  left,
const MArray< T > &  right 
)
inline

Definition at line 136 of file MArrayLogical.h.

template<typename T >
MArray<Bool> casacore::MArrayLogical_global_functions_MArray_logical_operations::operator< ( const MArray< T > &  left,
const T &  right 
)
inline

Definition at line 180 of file MArrayLogical.h.

template<typename T >
MArray<Bool> casacore::MArrayLogical_global_functions_MArray_logical_operations::operator< ( const T &  left,
const MArray< T > &  right 
)
inline

Definition at line 212 of file MArrayLogical.h.

template<typename T >
MArray<Bool> casacore::MArrayLogical_global_functions_MArray_logical_operations::operator<= ( const MArray< T > &  left,
const MArray< T > &  right 
)
inline

Definition at line 130 of file MArrayLogical.h.

template<typename T >
MArray<Bool> casacore::MArrayLogical_global_functions_MArray_logical_operations::operator<= ( const MArray< T > &  left,
const T &  right 
)
inline

Definition at line 176 of file MArrayLogical.h.

template<typename T >
MArray<Bool> casacore::MArrayLogical_global_functions_MArray_logical_operations::operator<= ( const T &  left,
const MArray< T > &  right 
)
inline

Definition at line 208 of file MArrayLogical.h.

template<typename T >
MArray<Bool> casacore::MArrayLogical_global_functions_MArray_logical_operations::operator== ( const MArray< T > &  left,
const MArray< T > &  right 
)
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().

template<typename T >
MArray<Bool> casacore::MArrayLogical_global_functions_MArray_logical_operations::operator== ( const MArray< T > &  left,
const T &  right 
)
inline

Definition at line 172 of file MArrayLogical.h.

References casacore::MArray< T >::array().

template<typename T >
MArray<Bool> casacore::MArrayLogical_global_functions_MArray_logical_operations::operator== ( const T &  left,
const MArray< T > &  right 
)
inline

Definition at line 204 of file MArrayLogical.h.

References casacore::MArray< T >::array().

template<typename T >
MArray<Bool> casacore::MArrayLogical_global_functions_MArray_logical_operations::operator> ( const MArray< T > &  left,
const MArray< T > &  right 
)
inline
template<typename T >
MArray<Bool> casacore::MArrayLogical_global_functions_MArray_logical_operations::operator> ( const MArray< T > &  left,
const T &  right 
)
inline

Definition at line 188 of file MArrayLogical.h.

References casacore::MArray< T >::array().

template<typename T >
MArray<Bool> casacore::MArrayLogical_global_functions_MArray_logical_operations::operator> ( const T &  left,
const MArray< T > &  right 
)
inline

Definition at line 220 of file MArrayLogical.h.

References casacore::MArray< T >::array().

template<typename T >
MArray<Bool> casacore::MArrayLogical_global_functions_MArray_logical_operations::operator>= ( const MArray< T > &  left,
const MArray< T > &  right 
)
inline
template<typename T >
MArray<Bool> casacore::MArrayLogical_global_functions_MArray_logical_operations::operator>= ( const MArray< T > &  left,
const T &  right 
)
inline

Definition at line 184 of file MArrayLogical.h.

References casacore::MArray< T >::array().

template<typename T >
MArray<Bool> casacore::MArrayLogical_global_functions_MArray_logical_operations::operator>= ( const T &  left,
const MArray< T > &  right 
)
inline

Definition at line 216 of file MArrayLogical.h.

References casacore::MArray< T >::array().

template<typename T >
MArray<Bool> casacore::MArrayLogical_global_functions_MArray_logical_operations::operator|| ( const MArray< T > &  left,
const MArray< T > &  right 
)
inline
template<typename T >
MArray<Bool> casacore::MArrayLogical_global_functions_MArray_logical_operations::operator|| ( const MArray< T > &  left,
const T &  right 
)
inline

Definition at line 196 of file MArrayLogical.h.

References casacore::MArray< T >::array().

template<typename T >
MArray<Bool> casacore::MArrayLogical_global_functions_MArray_logical_operations::operator|| ( const T &  left,
const MArray< T > &  right 
)
inline

The logical OR of 2 MArray objects (normally Bool type)

Definition at line 230 of file MArrayLogical.h.

References casacore::MArray< T >::array().

template<typename T >
MArray<Bool> casacore::MArrayLogical_global_functions_MArray_logical_operations::partialAlls ( const MArray< T > &  a,
const IPosition collapseAxes 
)
inline
template<typename T >
MArray<Bool> casacore::MArrayLogical_global_functions_MArray_logical_operations::partialAnys ( const MArray< T > &  a,
const IPosition collapseAxes 
)
inline
template<typename T >
MArray<uInt> casacore::MArrayLogical_global_functions_MArray_logical_operations::partialNFalse ( const MArray< T > &  a,
const IPosition collapseAxes 
)
inline

Get partial nfalses.

Definition at line 425 of file MArrayLogical.h.

References casacore::MArray< T >::array(), casacore::MArrayBase::hasMask(), and casacore::MArrayBase::isNull().

template<typename T >
MArray<uInt> casacore::MArrayLogical_global_functions_MArray_logical_operations::partialNTrue ( const MArray< T > &  a,
const IPosition collapseAxes 
)
inline
template<typename T >
MArray<Bool> casacore::MArrayLogical_global_functions_MArray_logical_operations::slidingAlls ( const MArray< T > &  a,
const IPosition halfBoxSize,
Bool  fillEdge = True 
)
inline
template<typename T >
MArray<Bool> casacore::MArrayLogical_global_functions_MArray_logical_operations::slidingAnys ( const MArray< T > &  a,
const IPosition halfBoxSize,
Bool  fillEdge = True 
)
inline
template<typename T >
MArray<uInt> casacore::MArrayLogical_global_functions_MArray_logical_operations::slidingNFalse ( const MArray< T > &  a,
const IPosition halfBoxSize,
Bool  fillEdge = True 
)
inline
template<typename T >
MArray<uInt> casacore::MArrayLogical_global_functions_MArray_logical_operations::slidingNTrue ( const MArray< T > &  a,
const IPosition halfBoxSize,
Bool  fillEdge = True 
)
inline

The documentation for this struct was generated from the following file: