Loading...
Searching...
No Matches
casacore::ArrayLogical_global_functions_Array_logical_operations Struct Reference
casa package (libcasa_casa) » Arrays_module

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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
template<class T>
LogicalArray | isNaN (const Array< T > &array)
| Element by element test for NaN or (In)finity.
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.
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.
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.
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.
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.
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.
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?
bool | anyTrue (const Array< bool > &array)
| Is any element true?
Array< bool > | partialAllTrue (const Array< bool > &array, const IPosition &collapseAxes)
| The same functions as above, but for selected axes.
Array< bool > | partialAnyTrue (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.
template<class T>
size_t | ntrue (const Array< T > &array)
template<class T>
Array< size_t > | partialNTrue (const Array< T > &array, const IPosition &collapseAxes)
| The same functions as above, but determine ntrue and nfalse for the given axes only.
template<class T>
Array< size_t > | partialNFalse (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

- Array

### 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;
casacore::Vector
Definition Vector.h:82

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);
casacore::ArrayLogical_global_functions_Array_logical_operations::allLT
bool allLT(const Array< T > &l, const Array< T > &r)

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

- Reconsider where the origin of the returned LogicalArray should be located.

Definition at line 111 of file ArrayLogical.h.

## Member Function Documentation

## allAND() [1/3]

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.

References casacore::array.

## allAND() [2/3]

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.

## allAND() [3/3]

template<class T>

bool casacore::ArrayLogical_global_functions_Array_logical_operations::allAND | ( | const T & | val,
|  | const Array< T > & | array )

References casacore::array.

## allEQ() [1/3]

template<class T>

bool casacore::ArrayLogical_global_functions_Array_logical_operations::allEQ | ( | const Array< T > & | array,
|  | const T & | val )

References casacore::array.

## allEQ() [2/3]

template<class T>

bool casacore::ArrayLogical_global_functions_Array_logical_operations::allEQ | ( | const Array< T > & | l,
|  | const Array< T > & | r )

Referenced by allSame(), and allTrue().

## allEQ() [3/3]

template<class T>

bool casacore::ArrayLogical_global_functions_Array_logical_operations::allEQ | ( | const T & | val,
|  | const Array< T > & | array )

References casacore::array.

## allGE() [1/3]

template<class T>

bool casacore::ArrayLogical_global_functions_Array_logical_operations::allGE | ( | const Array< T > & | array,
|  | const T & | val )

References casacore::array.

## allGE() [2/3]

template<class T>

bool casacore::ArrayLogical_global_functions_Array_logical_operations::allGE | ( | const Array< T > & | l,
|  | const Array< T > & | r )

## allGE() [3/3]

template<class T>

bool casacore::ArrayLogical_global_functions_Array_logical_operations::allGE | ( | const T & | val,
|  | const Array< T > & | array )

References casacore::array.

## allGT() [1/3]

template<class T>

bool casacore::ArrayLogical_global_functions_Array_logical_operations::allGT | ( | const Array< T > & | array,
|  | const T & | val )

References casacore::array.

## allGT() [2/3]

template<class T>

bool casacore::ArrayLogical_global_functions_Array_logical_operations::allGT | ( | const Array< T > & | l,
|  | const Array< T > & | r )

## allGT() [3/3]

template<class T>

bool casacore::ArrayLogical_global_functions_Array_logical_operations::allGT | ( | const T & | val,
|  | const Array< T > & | array )

References casacore::array.

## allLE() [1/3]

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.

References casacore::array.

## allLE() [2/3]

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

- ArrayConformanceError

## allLE() [3/3]

template<class T>

bool casacore::ArrayLogical_global_functions_Array_logical_operations::allLE | ( | const T & | val,
|  | const Array< T > & | array )

References casacore::array.

## allLT() [1/3]

template<class T>

bool casacore::ArrayLogical_global_functions_Array_logical_operations::allLT | ( | const Array< T > & | array,
|  | const T & | val )

References casacore::array.

## allLT() [2/3]

template<class T>

bool casacore::ArrayLogical_global_functions_Array_logical_operations::allLT | ( | const Array< T > & | l,
|  | const Array< T > & | r )

## allLT() [3/3]

template<class T>

bool casacore::ArrayLogical_global_functions_Array_logical_operations::allLT | ( | const T & | val,
|  | const Array< T > & | array )

References casacore::array.

## allNE() [1/3]

template<class T>

bool casacore::ArrayLogical_global_functions_Array_logical_operations::allNE | ( | const Array< T > & | array,
|  | const T & | val )

References casacore::array.

## allNE() [2/3]

template<class T>

bool casacore::ArrayLogical_global_functions_Array_logical_operations::allNE | ( | const Array< T > & | l,
|  | const Array< T > & | r )

## allNE() [3/3]

template<class T>

bool casacore::ArrayLogical_global_functions_Array_logical_operations::allNE | ( | const T & | val,
|  | const Array< T > & | array )

References casacore::array.

## allNear() [1/3]

template<class T>

bool casacore::ArrayLogical_global_functions_Array_logical_operations::allNear | ( | const Array< T > & | array,
|  | const T & | val,
|  | double | tol )

References casacore::array.

## allNear() [2/3]

template<class T>

bool casacore::ArrayLogical_global_functions_Array_logical_operations::allNear | ( | const Array< T > & | l,
|  | const Array< T > & | r,
|  | double | tol )

## allNear() [3/3]

template<class T>

bool casacore::ArrayLogical_global_functions_Array_logical_operations::allNear | ( | const T & | val,
|  | const Array< T > & | array,
|  | double | tol )

References casacore::array.

## allNearAbs() [1/3]

template<class T>

bool casacore::ArrayLogical_global_functions_Array_logical_operations::allNearAbs | ( | const Array< T > & | array,
|  | const T & | val,
|  | double | tol )

References casacore::array.

## allNearAbs() [2/3]

template<class T>

bool casacore::ArrayLogical_global_functions_Array_logical_operations::allNearAbs | ( | const Array< T > & | l,
|  | const Array< T > & | r,
|  | double | tol )

## allNearAbs() [3/3]

template<class T>

bool casacore::ArrayLogical_global_functions_Array_logical_operations::allNearAbs | ( | const T & | val,
|  | const Array< T > & | array,
|  | double | tol )

References casacore::array.

## allOR() [1/3]

template<class T>

bool casacore::ArrayLogical_global_functions_Array_logical_operations::allOR | ( | const Array< T > & | array,
|  | const T & | val )

References casacore::array.

## allOR() [2/3]

template<class T>

bool casacore::ArrayLogical_global_functions_Array_logical_operations::allOR | ( | const Array< T > & | l,
|  | const Array< T > & | r )

## allOR() [3/3]

template<class T>

bool casacore::ArrayLogical_global_functions_Array_logical_operations::allOR | ( | const T & | val,
|  | const Array< T > & | array )

References casacore::array.

## allSame()

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 255 of file ArrayLogical.h.

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

## allTrue()

bool casacore::ArrayLogical_global_functions_Array_logical_operations::allTrue | ( | const Array< bool > & | array | ) |

inline

Are all elements true?

Definition at line 382 of file ArrayLogical.h.

References allEQ(), and casacore::array.

## anyAND() [1/3]

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.

References casacore::array.

## anyAND() [2/3]

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.

## anyAND() [3/3]

template<class T>

bool casacore::ArrayLogical_global_functions_Array_logical_operations::anyAND | ( | const T & | val,
|  | const Array< T > & | array )

References casacore::array.

## anyEQ() [1/3]

template<class T>

bool casacore::ArrayLogical_global_functions_Array_logical_operations::anyEQ | ( | const Array< T > & | array,
|  | const T & | val )

References casacore::array.

## anyEQ() [2/3]

template<class T>

bool casacore::ArrayLogical_global_functions_Array_logical_operations::anyEQ | ( | const Array< T > & | l,
|  | const Array< T > & | r )

Referenced by anyTrue().

## anyEQ() [3/3]

template<class T>

bool casacore::ArrayLogical_global_functions_Array_logical_operations::anyEQ | ( | const T & | val,
|  | const Array< T > & | array )

References casacore::array.

## anyGE() [1/3]

template<class T>

bool casacore::ArrayLogical_global_functions_Array_logical_operations::anyGE | ( | const Array< T > & | array,
|  | const T & | val )

References casacore::array.

## anyGE() [2/3]

template<class T>

bool casacore::ArrayLogical_global_functions_Array_logical_operations::anyGE | ( | const Array< T > & | l,
|  | const Array< T > & | r )

## anyGE() [3/3]

template<class T>

bool casacore::ArrayLogical_global_functions_Array_logical_operations::anyGE | ( | const T & | val,
|  | const Array< T > & | array )

References casacore::array.

## anyGT() [1/3]

template<class T>

bool casacore::ArrayLogical_global_functions_Array_logical_operations::anyGT | ( | const Array< T > & | array,
|  | const T & | val )

References casacore::array.

## anyGT() [2/3]

template<class T>

bool casacore::ArrayLogical_global_functions_Array_logical_operations::anyGT | ( | const Array< T > & | l,
|  | const Array< T > & | r )

## anyGT() [3/3]

template<class T>

bool casacore::ArrayLogical_global_functions_Array_logical_operations::anyGT | ( | const T & | val,
|  | const Array< T > & | array )

References casacore::array.

## anyLE() [1/3]

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.

References casacore::array.

## anyLE() [2/3]

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

- ArrayConformanceError

## anyLE() [3/3]

template<class T>

bool casacore::ArrayLogical_global_functions_Array_logical_operations::anyLE | ( | const T & | val,
|  | const Array< T > & | array )

References casacore::array.

## anyLT() [1/3]

template<class T>

bool casacore::ArrayLogical_global_functions_Array_logical_operations::anyLT | ( | const Array< T > & | array,
|  | const T & | val )

References casacore::array.

## anyLT() [2/3]

template<class T>

bool casacore::ArrayLogical_global_functions_Array_logical_operations::anyLT | ( | const Array< T > & | l,
|  | const Array< T > & | r )

## anyLT() [3/3]

template<class T>

bool casacore::ArrayLogical_global_functions_Array_logical_operations::anyLT | ( | const T & | val,
|  | const Array< T > & | array )

References casacore::array.

## anyNE() [1/3]

template<class T>

bool casacore::ArrayLogical_global_functions_Array_logical_operations::anyNE | ( | const Array< T > & | array,
|  | const T & | val )

References casacore::array.

## anyNE() [2/3]

template<class T>

bool casacore::ArrayLogical_global_functions_Array_logical_operations::anyNE | ( | const Array< T > & | l,
|  | const Array< T > & | r )

## anyNE() [3/3]

template<class T>

bool casacore::ArrayLogical_global_functions_Array_logical_operations::anyNE | ( | const T & | val,
|  | const Array< T > & | array )

References casacore::array.

## anyNear() [1/3]

template<class T>

bool casacore::ArrayLogical_global_functions_Array_logical_operations::anyNear | ( | const Array< T > & | array,
|  | const T & | val,
|  | double | tol )

References casacore::array.

## anyNear() [2/3]

template<class T>

bool casacore::ArrayLogical_global_functions_Array_logical_operations::anyNear | ( | const Array< T > & | l,
|  | const Array< T > & | r,
|  | double | tol )

## anyNear() [3/3]

template<class T>

bool casacore::ArrayLogical_global_functions_Array_logical_operations::anyNear | ( | const T & | val,
|  | const Array< T > & | array,
|  | double | tol )

References casacore::array.

## anyNearAbs() [1/3]

template<class T>

bool casacore::ArrayLogical_global_functions_Array_logical_operations::anyNearAbs | ( | const Array< T > & | array,
|  | const T & | val,
|  | double | tol )

References casacore::array.

## anyNearAbs() [2/3]

template<class T>

bool casacore::ArrayLogical_global_functions_Array_logical_operations::anyNearAbs | ( | const Array< T > & | l,
|  | const Array< T > & | r,
|  | double | tol )

## anyNearAbs() [3/3]

template<class T>

bool casacore::ArrayLogical_global_functions_Array_logical_operations::anyNearAbs | ( | const T & | val,
|  | const Array< T > & | array,
|  | double | tol )

References casacore::array.

## anyOR() [1/3]

template<class T>

bool casacore::ArrayLogical_global_functions_Array_logical_operations::anyOR | ( | const Array< T > & | array,
|  | const T & | val )

References casacore::array.

## anyOR() [2/3]

template<class T>

bool casacore::ArrayLogical_global_functions_Array_logical_operations::anyOR | ( | const Array< T > & | l,
|  | const Array< T > & | r )

## anyOR() [3/3]

template<class T>

bool casacore::ArrayLogical_global_functions_Array_logical_operations::anyOR | ( | const T & | val,
|  | const Array< T > & | array )

References casacore::array.

## anyTrue()

bool casacore::ArrayLogical_global_functions_Array_logical_operations::anyTrue | ( | const Array< bool > & | array | ) |

inline

Is any element true?

Definition at line 386 of file ArrayLogical.h.

References anyEQ(), and casacore::array.

## arrayCompareAll() [1/3]

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.

## arrayCompareAll() [2/3]

template<typename T, typename CompareOperator>

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

## arrayCompareAll() [3/3]

template<typename T, typename CompareOperator>

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

## arrayCompareAny() [1/3]

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.

## arrayCompareAny() [2/3]

template<typename T, typename CompareOperator>

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

## arrayCompareAny() [3/3]

template<typename T, typename CompareOperator>

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

## isFinite()

template<class T>

LogicalArray casacore::ArrayLogical_global_functions_Array_logical_operations::isFinite | ( | const Array< T > & | array | ) |

References casacore::array.

## isInf()

template<class T>

LogicalArray casacore::ArrayLogical_global_functions_Array_logical_operations::isInf | ( | const Array< T > & | array | ) |

References casacore::array.

## isNaN()

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.

References casacore::array.

## near() [1/3]

template<class T>

LogicalArray casacore::ArrayLogical_global_functions_Array_logical_operations::near | ( | const Array< T > & | array,
|  | const T & | val,
|  | double | tol )

References casacore::array.

## near() [2/3]

template<class T>

LogicalArray casacore::ArrayLogical_global_functions_Array_logical_operations::near | ( | const Array< T > & | l,
|  | const Array< T > & | r,
|  | double | tol )

## near() [3/3]

template<class T>

LogicalArray casacore::ArrayLogical_global_functions_Array_logical_operations::near | ( | const T & | val,
|  | const Array< T > & | array,
|  | double | tol )

References casacore::array.

## nearAbs() [1/3]

template<class T>

LogicalArray casacore::ArrayLogical_global_functions_Array_logical_operations::nearAbs | ( | const Array< T > & | array,
|  | const T & | val,
|  | double | tol )

References casacore::array.

## nearAbs() [2/3]

template<class T>

LogicalArray casacore::ArrayLogical_global_functions_Array_logical_operations::nearAbs | ( | const Array< T > & | l,
|  | const Array< T > & | r,
|  | double | tol )

## nearAbs() [3/3]

template<class T>

LogicalArray casacore::ArrayLogical_global_functions_Array_logical_operations::nearAbs | ( | const T & | val,
|  | const Array< T > & | array,
|  | double | tol )

References casacore::array.

## nfalse()

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.

References casacore::array.

Referenced by ntrue().

## ntrue()

template<class T>

size_t casacore::ArrayLogical_global_functions_Array_logical_operations::ntrue | ( | const Array< T > & | array | ) |

inline

Definition at line 403 of file ArrayLogical.h.

References casacore::array, and nfalse().

## operator!()

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.

## operator!=() [1/3]

template<class T>

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

References casacore::array.

## operator!=() [2/3]

template<class T>

LogicalArray casacore::ArrayLogical_global_functions_Array_logical_operations::operator!= | ( | const Array< T > & | l,
|  | const Array< T > & | r )

## operator!=() [3/3]

template<class T>

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

References casacore::array.

## operator&&() [1/3]

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.

References casacore::array.

## operator&&() [2/3]

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.

## operator&&() [3/3]

template<class T>

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

References casacore::array.

## operator<() [1/3]

template<class T>

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

References casacore::array.

## operator<() [2/3]

template<class T>

LogicalArray casacore::ArrayLogical_global_functions_Array_logical_operations::operator< | ( | const Array< T > & | l,
|  | const Array< T > & | r )

## operator<() [3/3]

template<class T>

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

References casacore::array.

## operator<=() [1/3]

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

- ArrayConformanceError

References casacore::array.

## operator<=() [2/3]

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.

## operator<=() [3/3]

template<class T>

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

References casacore::array.

## operator==() [1/3]

template<class T>

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

References casacore::array.

## operator==() [2/3]

template<class T>

LogicalArray casacore::ArrayLogical_global_functions_Array_logical_operations::operator== | ( | const Array< T > & | l,
|  | const Array< T > & | r )

## operator==() [3/3]

template<class T>

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

References casacore::array.

## operator>() [1/3]

template<class T>

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

References casacore::array.

## operator>() [2/3]

template<class T>

LogicalArray casacore::ArrayLogical_global_functions_Array_logical_operations::operator> | ( | const Array< T > & | l,
|  | const Array< T > & | r )

## operator>() [3/3]

template<class T>

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

References casacore::array.

## operator>=() [1/3]

template<class T>

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

References casacore::array.

## operator>=() [2/3]

template<class T>

LogicalArray casacore::ArrayLogical_global_functions_Array_logical_operations::operator>= | ( | const Array< T > & | l,
|  | const Array< T > & | r )

## operator>=() [3/3]

template<class T>

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

References casacore::array.

## operator||() [1/3]

template<class T>

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

References casacore::array.

## operator||() [2/3]

template<class T>

LogicalArray casacore::ArrayLogical_global_functions_Array_logical_operations::operator|| | ( | const Array< T > & | l,
|  | const Array< T > & | r )

## operator||() [3/3]

template<class T>

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

References casacore::array.

## partialAllTrue()

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.

References casacore::array.

## partialAnyTrue()

Array< bool > casacore::ArrayLogical_global_functions_Array_logical_operations::partialAnyTrue | ( | const Array< bool > & | array,
|  | const IPosition & | collapseAxes )

References casacore::array.

## partialNFalse()

template<class T>

Array< size_t > casacore::ArrayLogical_global_functions_Array_logical_operations::partialNFalse | ( | const Array< T > & | array,
|  | const IPosition & | collapseAxes )

References casacore::array.

## partialNTrue()

template<class T>

Array< size_t > 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.

References casacore::array.

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

- casa/Arrays/ArrayLogical.h