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.
Member Description
Bool allLE (const Array<T> &l, const Array<T> &r)
Bool allLT (const Array<T> &l, const Array<T> &r)
Bool allGE (const Array<T> &l, const Array<T> &r)
Bool allGT (const Array<T> &l, const Array<T> &r)
Bool allEQ (const Array<T> &l, const Array<T> &r)
Bool allNE (const Array<T> &l, const Array<T> &r)
Bool allNear (const Array<T> &l, const Array<T> &r, Double tol)
Bool allNearAbs (const Array<T> &l, const Array<T> &r, Double tol)
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
Bool allAND (const Array<T> &l, const Array<T> &r)
Bool allOR (const Array<T> &l, const Array<T> &r)
This only makes sense if the array element type is logical valued.
LogicalArray operator <= (const Array<T> &l, const Array<T> &r)
LogicalArray operator < (const Array<T> &l, const Array<T> &r)
LogicalArray operator >= (const Array<T> &l, const Array<T> &r)
LogicalArray operator > (const Array<T> &l, const Array<T> &r)
LogicalArray operator == (const Array<T> &l, const Array<T> &r)
LogicalArray operator != (const Array<T> &l, const Array<T> &r)
VECLOG_LA_OP_AA ( <=, Vector )VECLOG_LA_OP_AA ( <, Vector )VECLOG_LA_OP_AA ( >=, Vector )VECLOG_LA_OP_AA ( >, Vector )VECLOG_LA_OP_AA ( ==, Vector )VECLOG_LA_OP_AA ( !=, Vector )VECLOG_LA_OP_AA ( &&, Vector )VECLOG_LA_OP_AA ( ||, Vector )
VECLOG_LA_OP_AA ( <=, Matrix )VECLOG_LA_OP_AA ( <, Matrix )VECLOG_LA_OP_AA ( >=, Matrix )VECLOG_LA_OP_AA ( >, Matrix )VECLOG_LA_OP_AA ( ==, Matrix )VECLOG_LA_OP_AA ( !=, Matrix )VECLOG_LA_OP_AA ( &&, Matrix )VECLOG_LA_OP_AA ( ||, Matrix )
VECLOG_LA_OP_AA ( <=, Cube )VECLOG_LA_OP_AA ( <, Cube )VECLOG_LA_OP_AA ( >=, Cube )VECLOG_LA_OP_AA ( >, Cube )VECLOG_LA_OP_AA ( ==, Cube )VECLOG_LA_OP_AA ( !=, Cube )VECLOG_LA_OP_AA ( &&, Cube )VECLOG_LA_OP_AA ( ||, Cube )
LogicalArray near(const Array<T> &l, const Array<T> &r, Double tol)
LogicalArray nearAbs(const Array<T> &l, const Array<T> &r, Double tol)
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.
LogicalArray operator && (const Array<T> &l, const Array<T> &r)
LogicalArray operator || (const Array<T> &l, const Array<T> &r)
This only makes sense if the array element type is logical valued.
LogicalArray operator ! (const Array<T> &l)
Logical negation of an array. This only makes sense if the array
element type is logical valued.
Bool allLE (const Array<T> &array, const T &val)
Bool allLE (const T &val, const Array<T> &array)
Bool allLT (const Array<T> &array, const T &val)
Bool allLT (const T &val, const Array<T> &array)
Bool allGE (const Array<T> &array, const T &val)
Bool allGE (const T &val, const Array<T> &array)
Bool allGT (const Array<T> &array, const T &val)
Bool allGT (const T &val, const Array<T> &array)
Bool allEQ (const Array<T> &array, const T &val)
Bool allEQ (const T &val, const Array<T> &array)
Bool allNE (const Array<T> &array, const T &val)
Bool allNE (const T &val, const Array<T> &array)
Bool allNear (const Array<T> &array, const T &val, Double tol)
Bool allNear (const T &val, const Array<T> &array, Double tol)
Bool allNearAbs (const Array<T> &array, const T &val, Double tol)
Bool allNearAbs (const T &val, const Array<T> &array, Double tol)
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.
Bool allAND (const Array<T> &array, const T &val)
Bool allAND (const T &val, const Array<T> &array)
Bool allOR (const Array<T> &array, const T &val)
Bool allOR (const T &val, const Array<T> &array)
This only makes sense if the array element type is logical valued.
LogicalArray operator <= (const Array<T> &array, const T &val)
LogicalArray operator <= (const T &val, const T<T> &array)
LogicalArray operator < (const Array<T> &array, const T &val)
LogicalArray operator < (const T &val, const T<T> &array)
LogicalArray operator >= (const Array<T> &array, const T &val)
LogicalArray operator >= (const T &val, const T<T> &array)
LogicalArray operator > (const Array<T> &array, const T &val)
LogicalArray operator > (const T &val, const T<T> &array)
LogicalArray operator == (const Array<T> &array, const T &val)
LogicalArray operator == (const T &val, const T<T> &array)
LogicalArray operator != (const Array<T> &array, const T &val)
LogicalArray operator != (const T &val, const T<T> &array)
LogicalArray near (const Array<T> &array, const T &val, Double tol)
LogicalArray near (const T &val, const T<T> &array, Double tol)
LogicalArray nearAbs (const Array<T> &array, const T &val, Double tol)
LogicalArray nearAbs (const T &val, const T<T> &array, Double tol)
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
LogicalArray operator && (const Array<T> &array, const T &val)
LogicalArray operator && (const T &val, const T<T> &array)
LogicalArray operator || (const Array<T> &array, const T &val)
LogicalArray operator || (const T &val, const T<T> &array)
This only makes sense if the array element type is logical valued.
Bool anyLE (const Array<T> &l, const Array<T> &r)
Bool anyLT (const Array<T> &l, const Array<T> &r)
Bool anyGE (const Array<T> &l, const Array<T> &r)
Bool anyGT (const Array<T> &l, const Array<T> &r)
Bool anyEQ (const Array<T> &l, const Array<T> &r)
Bool anyNE (const Array<T> &l, const Array<T> &r)
Bool anyNear (const Array<T> &l, const Array<T> &r, Double tol)
Bool anyNearAbs (const Array<T> &l, const Array<T> &r, Double tol)
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
Bool anyAND (const Array<T> &l, const Array<T> &r)
Bool anyOR (const Array<T> &l, const Array<T> &r)
This only makes sense if the array element type is logical valued.
Bool anyLE (const Array<T> &array, const T &val)
Bool anyLE (const T &val, const Array<T> &array)
Bool anyLT (const Array<T> &array, const T &val)
Bool anyLT (const T &val, const Array<T> &array)
Bool anyGE (const Array<T> &array, const T &val)
Bool anyGE (const T &val, const Array<T> &array)
Bool anyGT (const Array<T> &array, const T &val)
Bool anyGT (const T &val, const Array<T> &array)
Bool anyEQ (const Array<T> &array, const T &val)
Bool anyEQ (const T &val, const Array<T> &array)
Bool anyNE (const Array<T> &array, const T &val)
Bool anyNE (const T &val, const Array<T> &array)
Bool anyNear (const Array<T> &array, const T &val, Double tol)
Bool anyNear (const T &val, const Array<T> &array, Double tol)
Bool anyNearAbs (const Array<T> &array, const T &val, Double tol)
Bool anyNearAbs (const T &val, const Array<T> &array, Double tol)
Determine the number of true or false elements.
Note that is meant for Bool arrays, but can also be used for
e.g. Int arrays.
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.
Bool anyAND (const Array<T> &array, const T &val)
Bool anyAND (const T &val, const Array<T> &array)
Bool anyOR (const Array<T> &array, const T &val)
Bool anyOR (const T &val, const Array<T> &array)
Determine the number of true or false elements.
Note that is meant for Bool arrays, but can also be used for
e.g. Int arrays.
This only makes sense if the array element type is logical valued.
uInt ntrue (const Array<T> &array)
uInt nfalse (const Array<T> &array)
Determine the number of true or false elements.
Note that is meant for Bool arrays, but can also be used for
e.g. Int arrays.
Determine it for the full array.
Array<uInt> partialNTrue (const Array<T>& array, const IPosition& collapseAxes)
Array<uInt> partialNFalse (const Array<T>& array, const IPosition& collapseAxes)
Determine the number of true or false elements.
Note that is meant for Bool arrays, but can also be used for
e.g. Int arrays.