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

Logical operations for Arrays. More...

#include <ArrayLogical.h>

Public Member Functions

template<typename T , typename CompareOperator >
bool arrayCompareAll (const Array< T > &left, const Array< T > &right, CompareOperator op)
 Determine if the comparisons between corresponding array elements yield True. More...
 
template<typename T , typename CompareOperator >
bool arrayCompareAll (const Array< T > &left, T right, CompareOperator op)
 
template<typename T , typename CompareOperator >
bool arrayCompareAll (T left, const Array< T > &right, CompareOperator op)
 
template<typename T , typename CompareOperator >
bool arrayCompareAny (const Array< T > &left, const Array< T > &right, CompareOperator op)
 Determine if the comparisons between corresponding array elements yield True. More...
 
template<typename T , typename CompareOperator >
bool arrayCompareAny (const Array< T > &left, T right, CompareOperator op)
 
template<typename T , typename CompareOperator >
bool arrayCompareAny (T left, const Array< T > &right, CompareOperator op)
 
template<class T >
Bool allLE (const Array< T > &l, const Array< T > &r)
 Element by element comparisons between the "l" and "r" arrays. More...
 
template<class T >
Bool allLT (const Array< T > &l, const Array< T > &r)
 
template<class T >
Bool allGE (const Array< T > &l, const Array< T > &r)
 
template<class T >
Bool allGT (const Array< T > &l, const Array< T > &r)
 
template<class T >
Bool allEQ (const Array< T > &l, const Array< T > &r)
 
template<class T >
Bool allNE (const Array< T > &l, const Array< T > &r)
 
template<class T >
Bool allNear (const Array< T > &l, const Array< T > &r, Double tol)
 
template<class T >
Bool allNearAbs (const Array< T > &l, const Array< T > &r, Double tol)
 
template<class T >
Bool allAND (const Array< T > &l, const Array< T > &r)
 This only makes sense if the array element type is logical valued. More...
 
template<class T >
Bool allOR (const Array< T > &l, const Array< T > &r)
 
template<class T >
LogicalArray operator<= (const Array< T > &l, const Array< T > &r)
 Element by element comparisons between the "l" and "r" arrays. More...
 
template<class T >
LogicalArray operator< (const Array< T > &l, const Array< T > &r)
 
template<class T >
LogicalArray operator>= (const Array< T > &l, const Array< T > &r)
 
template<class T >
LogicalArray operator> (const Array< T > &l, const Array< T > &r)
 
template<class T >
LogicalArray operator== (const Array< T > &l, const Array< T > &r)
 
template<class T >
LogicalArray operator!= (const Array< T > &l, const Array< T > &r)
 
template<class T >
LogicalArray near (const Array< T > &l, const Array< T > &r, Double tol)
 
template<class T >
LogicalArray nearAbs (const Array< T > &l, const Array< T > &r, Double tol)
 
template<class T >
LogicalArray operator&& (const Array< T > &l, const Array< T > &r)
 This only makes sense if the array element type is logical valued. More...
 
template<class T >
LogicalArray operator|| (const Array< T > &l, const Array< T > &r)
 
template<class T >
LogicalArray operator! (const Array< T > &l)
 Logical negation of an array. More...
 
template<class T >
Bool allLE (const Array< T > &array, const T &val)
 Element by element comparisons between an array and a scalar, which behaves as if it were a conformant array filled with the value "val." The result is true only if the comparison is true for every element of the array. More...
 
template<class T >
Bool allLE (const T &val, const Array< T > &array)
 
template<class T >
Bool allLT (const Array< T > &array, const T &val)
 
template<class T >
Bool allLT (const T &val, const Array< T > &array)
 
template<class T >
Bool allGE (const Array< T > &array, const T &val)
 
template<class T >
Bool allGE (const T &val, const Array< T > &array)
 
template<class T >
Bool allGT (const Array< T > &array, const T &val)
 
template<class T >
Bool allGT (const T &val, const Array< T > &array)
 
template<class T >
Bool allEQ (const Array< T > &array, const T &val)
 
template<class T >
Bool allEQ (const T &val, const Array< T > &array)
 
template<class T >
Bool allNE (const Array< T > &array, const T &val)
 
template<class T >
Bool allNE (const T &val, const Array< T > &array)
 
template<class T >
Bool allNear (const Array< T > &array, const T &val, Double tol)
 
template<class T >
Bool allNear (const T &val, const Array< T > &array, Double tol)
 
template<class T >
Bool allNearAbs (const Array< T > &array, const T &val, Double tol)
 
template<class T >
Bool allNearAbs (const T &val, const Array< T > &array, Double tol)
 
template<class T >
Bool allAND (const Array< T > &array, const T &val)
 This only makes sense if the array element type is logical valued. More...
 
template<class T >
Bool allAND (const T &val, const Array< T > &array)
 
template<class T >
Bool allOR (const Array< T > &array, const T &val)
 
template<class T >
Bool allOR (const T &val, const Array< T > &array)
 
template<class T >
Bool allSame (const Array< T > &a)
 Test if all elements in an array are the same. More...
 
template<class T >
LogicalArray isNaN (const Array< T > &array)
 Element by element test for NaN or (In)finity. More...
 
template<class T >
LogicalArray isInf (const Array< T > &array)
 
template<class T >
LogicalArray isFinite (const Array< T > &array)
 
template<class T >
LogicalArray operator<= (const Array< T > &array, const T &val)
 
Element by element comparisons between an array and a scalar, which

behaves as if it were a conformant array filled with the value "val." The result is a LogicalArray. More...

 
template<class T >
LogicalArray operator<= (const T &val, const Array< T > &array)
 
template<class T >
LogicalArray operator< (const Array< T > &array, const T &val)
 
template<class T >
LogicalArray operator< (const T &val, const Array< T > &array)
 
template<class T >
LogicalArray operator>= (const Array< T > &array, const T &val)
 
template<class T >
LogicalArray operator>= (const T &val, const Array< T > &array)
 
template<class T >
LogicalArray operator> (const Array< T > &array, const T &val)
 
template<class T >
LogicalArray operator> (const T &val, const Array< T > &array)
 
template<class T >
LogicalArray operator== (const Array< T > &array, const T &val)
 
template<class T >
LogicalArray operator== (const T &val, const Array< T > &array)
 
template<class T >
LogicalArray operator!= (const Array< T > &array, const T &val)
 
template<class T >
LogicalArray operator!= (const T &val, const Array< T > &array)
 
template<class T >
LogicalArray near (const Array< T > &array, const T &val, Double tol)
 
template<class T >
LogicalArray near (const T &val, const Array< T > &array, Double tol)
 
template<class T >
LogicalArray nearAbs (const Array< T > &array, const T &val, Double tol)
 
template<class T >
LogicalArray nearAbs (const T &val, const Array< T > &array, Double tol)
 
template<class T >
LogicalArray operator&& (const Array< T > &array, const T &val)
 This only makes sense if the array element type is logical valued. More...
 
template<class T >
LogicalArray operator&& (const T &val, const Array< T > &array)
 
template<class T >
LogicalArray operator|| (const Array< T > &array, const T &val)
 
template<class T >
LogicalArray operator|| (const T &val, const Array< T > &array)
 
template<class T >
Bool anyLE (const Array< T > &l, const Array< T > &r)
 Element by element comparisons between the "l" and "r" arrays. More...
 
template<class T >
Bool anyLT (const Array< T > &l, const Array< T > &r)
 
template<class T >
Bool anyGE (const Array< T > &l, const Array< T > &r)
 
template<class T >
Bool anyGT (const Array< T > &l, const Array< T > &r)
 
template<class T >
Bool anyEQ (const Array< T > &l, const Array< T > &r)
 
template<class T >
Bool anyNE (const Array< T > &l, const Array< T > &r)
 
template<class T >
Bool anyNear (const Array< T > &l, const Array< T > &r, Double tol)
 
template<class T >
Bool anyNearAbs (const Array< T > &l, const Array< T > &r, Double tol)
 
template<class T >
Bool anyAND (const Array< T > &l, const Array< T > &r)
 This only makes sense if the array element type is logical valued. More...
 
template<class T >
Bool anyOR (const Array< T > &l, const Array< T > &r)
 
template<class T >
Bool anyLE (const Array< T > &array, const T &val)
 Element by element comparisons between an array and a scalar, which behaves as if it were a conformant array filled with the value "val." The result is true if the comparison is true for some element of the array. More...
 
template<class T >
Bool anyLE (const T &val, const Array< T > &array)
 
template<class T >
Bool anyLT (const Array< T > &array, const T &val)
 
template<class T >
Bool anyLT (const T &val, const Array< T > &array)
 
template<class T >
Bool anyGE (const Array< T > &array, const T &val)
 
template<class T >
Bool anyGE (const T &val, const Array< T > &array)
 
template<class T >
Bool anyGT (const Array< T > &array, const T &val)
 
template<class T >
Bool anyGT (const T &val, const Array< T > &array)
 
template<class T >
Bool anyEQ (const Array< T > &array, const T &val)
 
template<class T >
Bool anyEQ (const T &val, const Array< T > &array)
 
template<class T >
Bool anyNE (const Array< T > &array, const T &val)
 
template<class T >
Bool anyNE (const T &val, const Array< T > &array)
 
template<class T >
Bool anyNear (const Array< T > &array, const T &val, Double tol)
 
template<class T >
Bool anyNear (const T &val, const Array< T > &array, Double tol)
 
template<class T >
Bool anyNearAbs (const Array< T > &array, const T &val, Double tol)
 
template<class T >
Bool anyNearAbs (const T &val, const Array< T > &array, Double tol)
 
template<class T >
Bool anyAND (const Array< T > &array, const T &val)
 This only makes sense if the array element type is logical valued. More...
 
template<class T >
Bool anyAND (const T &val, const Array< T > &array)
 
template<class T >
Bool anyOR (const Array< T > &array, const T &val)
 
template<class T >
Bool anyOR (const T &val, const Array< T > &array)
 
Bool allTrue (const Array< Bool > &array)
 Are all elements true? More...
 
Bool anyTrue (const Array< Bool > &array)
 Is any element true? More...
 
Array< BoolpartialAllTrue (const Array< Bool > &array, const IPosition &collapseAxes)
 The same functions as above, but for selected axes. More...
 
Array< BoolpartialAnyTrue (const Array< Bool > &array, const IPosition &collapseAxes)
 
template<class T >
size_t nfalse (const Array< T > &array)
 Determine the number of true or false elements. More...
 
template<class T >
size_t ntrue (const Array< T > &array)
 
template<class T >
Array< uIntpartialNTrue (const Array< T > &array, const IPosition &collapseAxes)
 The same functions as above, but determine ntrue and nfalse for the given axes only. More...
 
template<class T >
Array< uIntpartialNFalse (const Array< T > &array, const IPosition &collapseAxes)
 

Detailed Description

Logical operations for Arrays.

Review Status

Reviewed By:
UNKNOWN
Date Reviewed:
before2004/08/25
Test programs:
tArrayLogical

Prerequisite

Etymology

This file contains global functions which perform element by element logical operations on arrays.

Synopsis

These functions perform element by element logical operations on arrays. The two arrays must conform, except for allEQ which returns False if the arrays do not conform.

There are two classes of functions. One class returns a LogicalArray. In these functions, the value of an element of the LogicalArray is the value of the logical operation applied to the corresponding elements of the input Arrays. The other class of functions returns a single Bool. The return value is True if the logical operation returns True for all elements of the input arrays for the "all" functions (e.g. allLE()), and returns True if the logical operation returns True for any elements of the input arrays for the "any" functions (e.g. anyLE()).

For instance allLE (a, b) implies that every element of a is less than or equal to every element of b. Note that with this definition allLE (a, b) and allGE (a, b) can both be false (e.g. a = [1,0] b = [0,1]).


Caution: Comparison between two zero-sized arrays is not defined (should it throw an exception?);

Example

Vector<Int> a(10);
Vector<Int> b(10);
LogicalVector l(10);
...
l = a < b;

This example sets the elements of l (a<b). The result of the comparison is a LogicalArray.

Example

Vector<Int> a(10);
Vector<Int> b(10);
Bool result;
...
result = allLT (a, b);

This example sets result to True if, for all elements, a<b.

Motivation

One wants to be able to perform logical operations on arrays.

To Do

Definition at line 120 of file ArrayLogical.h.

Member Function Documentation

template<class T >
Bool casacore::ArrayLogical_global_functions_Array_logical_operations::allAND ( const Array< T > &  l,
const Array< T > &  r 
)

This only makes sense if the array element type is logical valued.

template<class T >
Bool casacore::ArrayLogical_global_functions_Array_logical_operations::allAND ( const Array< T > &  array,
const T &  val 
)

This only makes sense if the array element type is logical valued.

template<class T >
Bool casacore::ArrayLogical_global_functions_Array_logical_operations::allAND ( const T &  val,
const Array< T > &  array 
)
template<class T >
Bool casacore::ArrayLogical_global_functions_Array_logical_operations::allEQ ( const Array< T > &  l,
const Array< T > &  r 
)
template<class T >
Bool casacore::ArrayLogical_global_functions_Array_logical_operations::allEQ ( const Array< T > &  array,
const T &  val 
)
template<class T >
Bool casacore::ArrayLogical_global_functions_Array_logical_operations::allEQ ( const T &  val,
const Array< T > &  array 
)
template<class T >
Bool casacore::ArrayLogical_global_functions_Array_logical_operations::allGE ( const Array< T > &  l,
const Array< T > &  r 
)
template<class T >
Bool casacore::ArrayLogical_global_functions_Array_logical_operations::allGE ( const Array< T > &  array,
const T &  val 
)
template<class T >
Bool casacore::ArrayLogical_global_functions_Array_logical_operations::allGE ( const T &  val,
const Array< T > &  array 
)
template<class T >
Bool casacore::ArrayLogical_global_functions_Array_logical_operations::allGT ( const Array< T > &  l,
const Array< T > &  r 
)
template<class T >
Bool casacore::ArrayLogical_global_functions_Array_logical_operations::allGT ( const Array< T > &  array,
const T &  val 
)
template<class T >
Bool casacore::ArrayLogical_global_functions_Array_logical_operations::allGT ( const T &  val,
const Array< T > &  array 
)
template<class T >
Bool casacore::ArrayLogical_global_functions_Array_logical_operations::allLE ( const Array< T > &  l,
const Array< T > &  r 
)

Element by element comparisons between the "l" and "r" arrays.

The result is true only if the comparison is true for every element of the arrays.

The operator forms of array logical operations which return a single Bool have been replaced by these "all" functions. The operator forms of array logical operations now return a LogicalArray.

The arrays must conform except for allEQ, which will return False if the arrays have different shapes.

Thrown Exceptions

template<class T >
Bool casacore::ArrayLogical_global_functions_Array_logical_operations::allLE ( const Array< T > &  array,
const T &  val 
)

Element by element comparisons between an array and a scalar, which behaves as if it were a conformant array filled with the value "val." The result is true only if the comparison is true for every element of the array.

template<class T >
Bool casacore::ArrayLogical_global_functions_Array_logical_operations::allLE ( const T &  val,
const Array< T > &  array 
)
template<class T >
Bool casacore::ArrayLogical_global_functions_Array_logical_operations::allLT ( const Array< T > &  l,
const Array< T > &  r 
)
template<class T >
Bool casacore::ArrayLogical_global_functions_Array_logical_operations::allLT ( const Array< T > &  array,
const T &  val 
)
template<class T >
Bool casacore::ArrayLogical_global_functions_Array_logical_operations::allLT ( const T &  val,
const Array< T > &  array 
)
template<class T >
Bool casacore::ArrayLogical_global_functions_Array_logical_operations::allNE ( const Array< T > &  l,
const Array< T > &  r 
)
template<class T >
Bool casacore::ArrayLogical_global_functions_Array_logical_operations::allNE ( const Array< T > &  array,
const T &  val 
)
template<class T >
Bool casacore::ArrayLogical_global_functions_Array_logical_operations::allNE ( const T &  val,
const Array< T > &  array 
)
template<class T >
Bool casacore::ArrayLogical_global_functions_Array_logical_operations::allNear ( const Array< T > &  l,
const Array< T > &  r,
Double  tol 
)
template<class T >
Bool casacore::ArrayLogical_global_functions_Array_logical_operations::allNear ( const Array< T > &  array,
const T &  val,
Double  tol 
)
template<class T >
Bool casacore::ArrayLogical_global_functions_Array_logical_operations::allNear ( const T &  val,
const Array< T > &  array,
Double  tol 
)
template<class T >
Bool casacore::ArrayLogical_global_functions_Array_logical_operations::allNearAbs ( const Array< T > &  l,
const Array< T > &  r,
Double  tol 
)
template<class T >
Bool casacore::ArrayLogical_global_functions_Array_logical_operations::allNearAbs ( const Array< T > &  array,
const T &  val,
Double  tol 
)
template<class T >
Bool casacore::ArrayLogical_global_functions_Array_logical_operations::allNearAbs ( const T &  val,
const Array< T > &  array,
Double  tol 
)
template<class T >
Bool casacore::ArrayLogical_global_functions_Array_logical_operations::allOR ( const Array< T > &  l,
const Array< T > &  r 
)
template<class T >
Bool casacore::ArrayLogical_global_functions_Array_logical_operations::allOR ( const Array< T > &  array,
const T &  val 
)
template<class T >
Bool casacore::ArrayLogical_global_functions_Array_logical_operations::allOR ( const T &  val,
const Array< T > &  array 
)
template<class T >
Bool casacore::ArrayLogical_global_functions_Array_logical_operations::allSame ( const Array< T > &  a)
inline

Test if all elements in an array are the same.

Definition at line 264 of file ArrayLogical.h.

References casacore::Array< T >::data(), and casacore::ArrayBase::size().

Bool casacore::ArrayLogical_global_functions_Array_logical_operations::allTrue ( const Array< Bool > &  array)
inline

Are all elements true?

Definition at line 391 of file ArrayLogical.h.

References casacore::True.

template<class T >
Bool casacore::ArrayLogical_global_functions_Array_logical_operations::anyAND ( const Array< T > &  l,
const Array< T > &  r 
)

This only makes sense if the array element type is logical valued.

template<class T >
Bool casacore::ArrayLogical_global_functions_Array_logical_operations::anyAND ( const Array< T > &  array,
const T &  val 
)

This only makes sense if the array element type is logical valued.

template<class T >
Bool casacore::ArrayLogical_global_functions_Array_logical_operations::anyAND ( const T &  val,
const Array< T > &  array 
)
template<class T >
Bool casacore::ArrayLogical_global_functions_Array_logical_operations::anyEQ ( const Array< T > &  l,
const Array< T > &  r 
)
template<class T >
Bool casacore::ArrayLogical_global_functions_Array_logical_operations::anyEQ ( const Array< T > &  array,
const T &  val 
)
template<class T >
Bool casacore::ArrayLogical_global_functions_Array_logical_operations::anyEQ ( const T &  val,
const Array< T > &  array 
)
template<class T >
Bool casacore::ArrayLogical_global_functions_Array_logical_operations::anyGE ( const Array< T > &  l,
const Array< T > &  r 
)
template<class T >
Bool casacore::ArrayLogical_global_functions_Array_logical_operations::anyGE ( const Array< T > &  array,
const T &  val 
)
template<class T >
Bool casacore::ArrayLogical_global_functions_Array_logical_operations::anyGE ( const T &  val,
const Array< T > &  array 
)
template<class T >
Bool casacore::ArrayLogical_global_functions_Array_logical_operations::anyGT ( const Array< T > &  l,
const Array< T > &  r 
)
template<class T >
Bool casacore::ArrayLogical_global_functions_Array_logical_operations::anyGT ( const Array< T > &  array,
const T &  val 
)
template<class T >
Bool casacore::ArrayLogical_global_functions_Array_logical_operations::anyGT ( const T &  val,
const Array< T > &  array 
)
template<class T >
Bool casacore::ArrayLogical_global_functions_Array_logical_operations::anyLE ( const Array< T > &  l,
const Array< T > &  r 
)

Element by element comparisons between the "l" and "r" arrays.

The result is true if the comparison is true for some element of the arrays.

Thrown Exceptions

template<class T >
Bool casacore::ArrayLogical_global_functions_Array_logical_operations::anyLE ( const Array< T > &  array,
const T &  val 
)

Element by element comparisons between an array and a scalar, which behaves as if it were a conformant array filled with the value "val." The result is true if the comparison is true for some element of the array.

At some point operators will be available that return masks where the comparison is true.

template<class T >
Bool casacore::ArrayLogical_global_functions_Array_logical_operations::anyLE ( const T &  val,
const Array< T > &  array 
)
template<class T >
Bool casacore::ArrayLogical_global_functions_Array_logical_operations::anyLT ( const Array< T > &  l,
const Array< T > &  r 
)
template<class T >
Bool casacore::ArrayLogical_global_functions_Array_logical_operations::anyLT ( const Array< T > &  array,
const T &  val 
)
template<class T >
Bool casacore::ArrayLogical_global_functions_Array_logical_operations::anyLT ( const T &  val,
const Array< T > &  array 
)
template<class T >
Bool casacore::ArrayLogical_global_functions_Array_logical_operations::anyNE ( const Array< T > &  l,
const Array< T > &  r 
)
template<class T >
Bool casacore::ArrayLogical_global_functions_Array_logical_operations::anyNE ( const Array< T > &  array,
const T &  val 
)
template<class T >
Bool casacore::ArrayLogical_global_functions_Array_logical_operations::anyNE ( const T &  val,
const Array< T > &  array 
)
template<class T >
Bool casacore::ArrayLogical_global_functions_Array_logical_operations::anyNear ( const Array< T > &  l,
const Array< T > &  r,
Double  tol 
)
template<class T >
Bool casacore::ArrayLogical_global_functions_Array_logical_operations::anyNear ( const Array< T > &  array,
const T &  val,
Double  tol 
)
template<class T >
Bool casacore::ArrayLogical_global_functions_Array_logical_operations::anyNear ( const T &  val,
const Array< T > &  array,
Double  tol 
)
template<class T >
Bool casacore::ArrayLogical_global_functions_Array_logical_operations::anyNearAbs ( const Array< T > &  l,
const Array< T > &  r,
Double  tol 
)
template<class T >
Bool casacore::ArrayLogical_global_functions_Array_logical_operations::anyNearAbs ( const Array< T > &  array,
const T &  val,
Double  tol 
)
template<class T >
Bool casacore::ArrayLogical_global_functions_Array_logical_operations::anyNearAbs ( const T &  val,
const Array< T > &  array,
Double  tol 
)
template<class T >
Bool casacore::ArrayLogical_global_functions_Array_logical_operations::anyOR ( const Array< T > &  l,
const Array< T > &  r 
)
template<class T >
Bool casacore::ArrayLogical_global_functions_Array_logical_operations::anyOR ( const Array< T > &  array,
const T &  val 
)
template<class T >
Bool casacore::ArrayLogical_global_functions_Array_logical_operations::anyOR ( const T &  val,
const Array< T > &  array 
)
Bool casacore::ArrayLogical_global_functions_Array_logical_operations::anyTrue ( const Array< Bool > &  array)
inline

Is any element true?

Definition at line 395 of file ArrayLogical.h.

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

template<typename T , typename CompareOperator >
bool casacore::ArrayLogical_global_functions_Array_logical_operations::arrayCompareAll ( const Array< T > &  left,
const Array< T > &  right,
CompareOperator  op 
)

Determine if the comparisons between corresponding array elements yield True.

template<typename T , typename CompareOperator >
bool casacore::ArrayLogical_global_functions_Array_logical_operations::arrayCompareAll ( const Array< T > &  left,
right,
CompareOperator  op 
)
template<typename T , typename CompareOperator >
bool casacore::ArrayLogical_global_functions_Array_logical_operations::arrayCompareAll ( left,
const Array< T > &  right,
CompareOperator  op 
)
template<typename T , typename CompareOperator >
bool casacore::ArrayLogical_global_functions_Array_logical_operations::arrayCompareAny ( const Array< T > &  left,
const Array< T > &  right,
CompareOperator  op 
)

Determine if the comparisons between corresponding array elements yield True.

template<typename T , typename CompareOperator >
bool casacore::ArrayLogical_global_functions_Array_logical_operations::arrayCompareAny ( const Array< T > &  left,
right,
CompareOperator  op 
)
template<typename T , typename CompareOperator >
bool casacore::ArrayLogical_global_functions_Array_logical_operations::arrayCompareAny ( left,
const Array< T > &  right,
CompareOperator  op 
)
template<class T >
LogicalArray casacore::ArrayLogical_global_functions_Array_logical_operations::isFinite ( const Array< T > &  array)
template<class T >
LogicalArray casacore::ArrayLogical_global_functions_Array_logical_operations::isInf ( const Array< T > &  array)
template<class T >
LogicalArray casacore::ArrayLogical_global_functions_Array_logical_operations::isNaN ( const Array< T > &  array)

Element by element test for NaN or (In)finity.

template<class T >
LogicalArray casacore::ArrayLogical_global_functions_Array_logical_operations::near ( const Array< T > &  l,
const Array< T > &  r,
Double  tol 
)
template<class T >
LogicalArray casacore::ArrayLogical_global_functions_Array_logical_operations::near ( const Array< T > &  array,
const T &  val,
Double  tol 
)
template<class T >
LogicalArray casacore::ArrayLogical_global_functions_Array_logical_operations::near ( const T &  val,
const Array< T > &  array,
Double  tol 
)
template<class T >
LogicalArray casacore::ArrayLogical_global_functions_Array_logical_operations::nearAbs ( const Array< T > &  l,
const Array< T > &  r,
Double  tol 
)
template<class T >
LogicalArray casacore::ArrayLogical_global_functions_Array_logical_operations::nearAbs ( const Array< T > &  array,
const T &  val,
Double  tol 
)
template<class T >
LogicalArray casacore::ArrayLogical_global_functions_Array_logical_operations::nearAbs ( const T &  val,
const Array< T > &  array,
Double  tol 
)
template<class T >
size_t casacore::ArrayLogical_global_functions_Array_logical_operations::nfalse ( const Array< T > &  array)

Determine the number of true or false elements.

Note: it is meant for Bool arrays, but can also be used for e.g. Int arrays.

Determine it for the full array.

template<class T >
size_t casacore::ArrayLogical_global_functions_Array_logical_operations::ntrue ( const Array< T > &  array)
inline

Definition at line 412 of file ArrayLogical.h.

References casacore::ArrayBase::nelements(), and casacore::nfalse().

template<class T >
LogicalArray casacore::ArrayLogical_global_functions_Array_logical_operations::operator! ( const Array< T > &  l)

Logical negation of an array.

This only makes sense if the array element type is logical valued.

template<class T >
LogicalArray casacore::ArrayLogical_global_functions_Array_logical_operations::operator!= ( const Array< T > &  l,
const Array< T > &  r 
)
template<class T >
LogicalArray casacore::ArrayLogical_global_functions_Array_logical_operations::operator!= ( const Array< T > &  array,
const T &  val 
)
template<class T >
LogicalArray casacore::ArrayLogical_global_functions_Array_logical_operations::operator!= ( const T &  val,
const Array< T > &  array 
)
template<class T >
LogicalArray casacore::ArrayLogical_global_functions_Array_logical_operations::operator&& ( const Array< T > &  l,
const Array< T > &  r 
)

This only makes sense if the array element type is logical valued.

template<class T >
LogicalArray casacore::ArrayLogical_global_functions_Array_logical_operations::operator&& ( const Array< T > &  array,
const T &  val 
)

This only makes sense if the array element type is logical valued.

template<class T >
LogicalArray casacore::ArrayLogical_global_functions_Array_logical_operations::operator&& ( const T &  val,
const Array< T > &  array 
)
template<class T >
LogicalArray casacore::ArrayLogical_global_functions_Array_logical_operations::operator< ( const Array< T > &  l,
const Array< T > &  r 
)
template<class T >
LogicalArray casacore::ArrayLogical_global_functions_Array_logical_operations::operator< ( const Array< T > &  array,
const T &  val 
)
template<class T >
LogicalArray casacore::ArrayLogical_global_functions_Array_logical_operations::operator< ( const T &  val,
const Array< T > &  array 
)
template<class T >
LogicalArray casacore::ArrayLogical_global_functions_Array_logical_operations::operator<= ( const Array< T > &  l,
const Array< T > &  r 
)

Element by element comparisons between the "l" and "r" arrays.

The result is a LogicalArray. The arrays must conform or an exception is thrown.

The Vector, Matrix and Cube version are present to bypass the problems due to the existence of automatic comparison inline templates in standard algorithm library, producing a single Bool value.

template<class T >
LogicalArray casacore::ArrayLogical_global_functions_Array_logical_operations::operator<= ( const Array< T > &  array,
const T &  val 
)

Element by element comparisons between an array and a scalar, which

behaves as if it were a conformant array filled with the value "val." The result is a LogicalArray.

Thrown Exceptions

template<class T >
LogicalArray casacore::ArrayLogical_global_functions_Array_logical_operations::operator<= ( const T &  val,
const Array< T > &  array 
)
template<class T >
LogicalArray casacore::ArrayLogical_global_functions_Array_logical_operations::operator== ( const Array< T > &  l,
const Array< T > &  r 
)
template<class T >
LogicalArray casacore::ArrayLogical_global_functions_Array_logical_operations::operator== ( const Array< T > &  array,
const T &  val 
)
template<class T >
LogicalArray casacore::ArrayLogical_global_functions_Array_logical_operations::operator== ( const T &  val,
const Array< T > &  array 
)
template<class T >
LogicalArray casacore::ArrayLogical_global_functions_Array_logical_operations::operator> ( const Array< T > &  l,
const Array< T > &  r 
)
template<class T >
LogicalArray casacore::ArrayLogical_global_functions_Array_logical_operations::operator> ( const Array< T > &  array,
const T &  val 
)
template<class T >
LogicalArray casacore::ArrayLogical_global_functions_Array_logical_operations::operator> ( const T &  val,
const Array< T > &  array 
)
template<class T >
LogicalArray casacore::ArrayLogical_global_functions_Array_logical_operations::operator>= ( const Array< T > &  l,
const Array< T > &  r 
)
template<class T >
LogicalArray casacore::ArrayLogical_global_functions_Array_logical_operations::operator>= ( const Array< T > &  array,
const T &  val 
)
template<class T >
LogicalArray casacore::ArrayLogical_global_functions_Array_logical_operations::operator>= ( const T &  val,
const Array< T > &  array 
)
template<class T >
LogicalArray casacore::ArrayLogical_global_functions_Array_logical_operations::operator|| ( const Array< T > &  l,
const Array< T > &  r 
)
template<class T >
LogicalArray casacore::ArrayLogical_global_functions_Array_logical_operations::operator|| ( const Array< T > &  array,
const T &  val 
)
template<class T >
LogicalArray casacore::ArrayLogical_global_functions_Array_logical_operations::operator|| ( const T &  val,
const Array< T > &  array 
)
Array<Bool> casacore::ArrayLogical_global_functions_Array_logical_operations::partialAllTrue ( const Array< Bool > &  array,
const IPosition collapseAxes 
)

The same functions as above, but for selected axes.

Array<Bool> casacore::ArrayLogical_global_functions_Array_logical_operations::partialAnyTrue ( const Array< Bool > &  array,
const IPosition collapseAxes 
)
template<class T >
Array<uInt> casacore::ArrayLogical_global_functions_Array_logical_operations::partialNFalse ( const Array< T > &  array,
const IPosition collapseAxes 
)
template<class T >
Array<uInt> casacore::ArrayLogical_global_functions_Array_logical_operations::partialNTrue ( const Array< T > &  array,
const IPosition collapseAxes 
)

The same functions as above, but determine ntrue and nfalse for the given axes only.

The result is an array with a shape formed by the remaining axes. For example, for an array with shape [3,4,5], collapsing axis 0 results in an array with shape [4,5] containing ntrue or nfalse for each X line. Summing for axes 0 and 2 results in an array with shape [4] containing ntrue or nfalse for each XZ plane.


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