28 #ifndef CASA_ARRAYLOGICAL_2_H
29 #define CASA_ARRAYLOGICAL_2_H
117 template<
typename T,
typename CompareOperator>
120 template<
typename T,
typename CompareOperator>
123 template<
typename T,
typename CompareOperator>
130 template<
typename T,
typename CompareOperator>
133 template<
typename T,
typename CompareOperator>
136 template<
typename T,
typename CompareOperator>
258 {
return a.
size() <= 1 || allEQ(*a.
data(), a); }
384 template<
typename Alloc>
386 {
return allEQ (
array,
true); }
389 template<
typename Alloc>
448 template<
typename T,
typename RES=
size_t>
455 template<
typename T,
typename RES=
size_t>
463 #include "ArrayLogical.tcc"
Logical functor to test if all elements are true.
virtual bool operator()(const Array< T > &arr) const override
Logical functor to test if any elements are true.
virtual bool operator()(const Array< T > &arr) const override
T * data()
Get a pointer to the beginning of the array.
Logical functor to count the number of false elements.
virtual RES operator()(const Array< T > &arr) const override
Logical functor to count the number of true elements.
virtual RES operator()(const Array< T > &arr) const override
this file contains all the compiler specific defines
LatticeExprNode operator&&(const LatticeExprNode &left, const LatticeExprNode &right)
Logical binary operators.
LatticeExprNode operator>(const LatticeExprNode &left, const LatticeExprNode &right)
TableExprNode array(const TableExprNode &values, const TableExprNodeSet &shape)
Create an array of the given shape and fill it with the values.
bool operator==(const casacore_allocator< T, ALIGNMENT > &, const casacore_allocator< T, ALIGNMENT > &)
bool operator!=(const casacore_allocator< T, ALIGNMENT > &, const casacore_allocator< T, ALIGNMENT > &)
LatticeExprNode ntrue(const LatticeExprNode &expr)
LatticeExprNode operator<(const LatticeExprNode &left, const LatticeExprNode &right)
LatticeExprNode operator>=(const LatticeExprNode &left, const LatticeExprNode &right)
Bool anyEQ(const TableVector< T > &l, const TableVector< T > &r)
LatticeExprNode operator!(const LatticeExprNode &expr)
LatticeExprNode operator<=(const LatticeExprNode &left, const LatticeExprNode &right)
LatticeExprNode operator||(const LatticeExprNode &left, const LatticeExprNode &right)
LatticeExprNode nfalse(const LatticeExprNode &expr)
bool arrayCompareAny(const Array< T > &left, const Array< T > &right, CompareOperator op)
Determine if the comparisons between corresponding array elements yield true.
bool anyNearAbs(const Array< T > &l, const Array< T > &r, double tol)
bool allAND(const Array< T > &l, const Array< T > &r)
This only makes sense if the array element type is logical valued.
bool allNearAbs(const T &val, const Array< T > &array, double tol)
bool anyGE(const T &val, const Array< T > &array)
bool anyNE(const Array< T > &l, const Array< T > &r)
bool allGE(const Array< T > &array, const T &val)
bool allLT(const Array< T > &array, const T &val)
bool anyAND(const T &val, const Array< T > &array)
LogicalArray nearAbs(const Array< T > &array, const T &val, double tol)
bool anyNearAbs(const T &val, const Array< T > &array, double tol)
bool anyGE(const Array< T > &l, const Array< T > &r)
bool allOR(const Array< T > &array, const T &val)
LogicalArray near(const Array< T > &l, const Array< T > &r, double tol)
LogicalArray isFinite(const Array< T > &array)
LogicalArray nearAbs(const T &val, const Array< T > &array, double tol)
bool allGE(const T &val, const Array< T > &array)
bool anyEQ(const T &val, const Array< T > &array)
bool arrayCompareAny(const Array< T > &left, T right, CompareOperator op)
Array< bool > partialAllTrue(const Array< bool > &array, const IPosition &collapseAxes)
The same functions as above, but for selected axes.
size_t nfalse(const Array< T > &array)
Determine the number of true or false elements.
bool anyLE(const T &val, const Array< T > &array)
bool allGT(const T &val, const Array< T > &array)
bool anyNearAbs(const Array< T > &array, const T &val, double tol)
bool arrayCompareAll(const Array< T > &left, T right, CompareOperator op)
bool anyNear(const Array< T > &l, const Array< T > &r, double tol)
bool anyNE(const T &val, const Array< T > &array)
bool allLT(const T &val, const Array< T > &array)
bool anyLT(const Array< T > &array, const T &val)
bool arrayCompareAll(const Array< T > &left, const Array< T > &right, CompareOperator op)
Determine if the comparisons between corresponding array elements yield true.
bool allNE(const Array< T > &l, const Array< T > &r)
bool anyLE(const Array< T > &l, const Array< T > &r)
Element by element comparisons between the "l" and "r" arrays.
bool allEQ(const Array< T > &array, const T &val)
bool anyNear(const T &val, const Array< T > &array, double tol)
bool allNE(const Array< T > &array, const T &val)
bool allAND(const T &val, const Array< T > &array)
bool allOR(const T &val, const Array< T > &array)
bool allSame(const Array< T > &a)
Test if all elements in an array are the same.
Array< bool > partialAnyTrue(const Array< bool > &array, const IPosition &collapseAxes)
bool allGT(const Array< T > &array, const T &val)
Array< size_t > partialNFalse(const Array< T > &array, const IPosition &collapseAxes)
bool anyEQ(const Array< T > &l, const Array< T > &r)
bool allGE(const Array< T > &l, const Array< T > &r)
bool anyOR(const T &val, const Array< T > &array)
bool allNE(const T &val, const Array< T > &array)
bool allNear(const Array< T > &l, const Array< T > &r, double tol)
bool allTrue(const Array< bool, Alloc > &array)
Are all elements true?
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.
bool allLE(const Array< T > &l, const Array< T > &r)
Element by element comparisons between the "l" and "r" arrays.
bool allLE(const T &val, const Array< T > &array)
LogicalArray nearAbs(const Array< T > &l, const Array< T > &r, double tol)
bool anyGT(const T &val, const Array< T > &array)
bool anyEQ(const Array< T > &array, const T &val)
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 conforman...
bool anyGT(const Array< T > &l, const Array< T > &r)
LogicalArray isNaN(const Array< T > &array)
Element by element test for NaN or (In)finity.
bool allEQ(const Array< T > &l, const Array< T > &r)
bool allGT(const Array< T > &l, const Array< T > &r)
bool allNear(const Array< T > &array, const T &val, double tol)
bool allAND(const Array< T > &array, const T &val)
This only makes sense if the array element type is logical valued.
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 conforman...
bool allNear(const T &val, const Array< T > &array, double tol)
bool arrayCompareAll(T left, const Array< T > &right, CompareOperator op)
bool allEQ(const T &val, const Array< T > &array)
bool allNearAbs(const Array< T > &l, const Array< T > &r, double tol)
bool anyOR(const Array< T > &array, const T &val)
bool anyNE(const Array< T > &array, const T &val)
bool anyLT(const T &val, const Array< T > &array)
bool anyAND(const Array< T > &l, const Array< T > &r)
This only makes sense if the array element type is logical valued.
bool allNearAbs(const Array< T > &array, const T &val, double tol)
LogicalArray near(const T &val, const Array< T > &array, double tol)
bool anyTrue(const Array< bool, Alloc > &array)
Is any element true?
LogicalArray isInf(const Array< T > &array)
bool anyGT(const Array< T > &array, const T &val)
bool anyOR(const Array< T > &l, const Array< T > &r)
bool allLT(const Array< T > &l, const Array< T > &r)
bool anyAND(const Array< T > &array, const T &val)
This only makes sense if the array element type is logical valued.
bool anyLT(const Array< T > &l, const Array< T > &r)
bool anyNear(const Array< T > &array, const T &val, double tol)
bool allOR(const Array< T > &l, const Array< T > &r)
LogicalArray near(const Array< T > &array, const T &val, double tol)
size_t ntrue(const Array< T > &array)
bool arrayCompareAny(T left, const Array< T > &right, CompareOperator op)
bool anyGE(const Array< T > &array, const T &val)