casacore
 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)
 
template<typename Alloc >
bool allTrue (const Array< bool, Alloc > &array)
 Are all elements true? More...
 
template<typename Alloc >
bool anyTrue (const Array< bool, Alloc > &array)
 Is any element true? More...
 
Array< bool > partialAllTrue (const Array< bool > &array, const IPosition &collapseAxes)
 The same functions as above, but for selected axes. More...
 
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. More...
 
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. More...
 
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

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

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

template<typename Alloc >
bool casacore::ArrayLogical_global_functions_Array_logical_operations::allTrue ( const Array< bool, Alloc > &  array)
inline

Are all elements true?

Definition at line 385 of file ArrayLogical.h.

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 
)
template<typename Alloc >
bool casacore::ArrayLogical_global_functions_Array_logical_operations::anyTrue ( const Array< bool, Alloc > &  array)
inline

Is any element true?

Definition at line 390 of file ArrayLogical.h.

References casacore::anyEQ().

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 407 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<size_t> casacore::ArrayLogical_global_functions_Array_logical_operations::partialNFalse ( const Array< T > &  array,
const IPosition collapseAxes 
)
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.


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