28 #ifndef CASA_ARRAYLOGICAL_2_H
29 #define CASA_ARRAYLOGICAL_2_H
117 template<
typename T,
typename CompareOperator>
120 template<
typename T,
typename CompareOperator>
121 bool arrayCompareAll (
const Array<T>& left, T right,
123 template<
typename T,
typename CompareOperator>
124 bool arrayCompareAll (T left,
const Array<T>& right,
130 template<
typename T,
typename CompareOperator>
133 template<
typename T,
typename CompareOperator>
134 bool arrayCompareAny (
const Array<T>& left, T right,
136 template<
typename T,
typename CompareOperator>
137 bool arrayCompareAny (T left,
const Array<T>& right,
187 template<
class T>
LogicalArray operator <= (const Array<T> &l,
189 template<
class T>
LogicalArray operator < (const Array<T> &l,
226 template<
class T>
bool allLE (
const Array<T> &
array,
const T &val);
227 template<
class T>
bool allLE (
const T &val,
const Array<T> &
array);
228 template<
class T>
bool allLT (
const Array<T> &
array,
const T &val);
229 template<
class T>
bool allLT (
const T &val,
const Array<T> &
array);
230 template<
class T>
bool allGE (
const Array<T> &
array,
const T &val);
231 template<
class T>
bool allGE (
const T &val,
const Array<T> &
array);
232 template<
class T>
bool allGT (
const Array<T> &
array,
const T &val);
233 template<
class T>
bool allGT (
const T &val,
const Array<T> &
array);
234 template<
class T>
bool allEQ (
const Array<T> &
array,
const T &val);
235 template<
class T>
bool allEQ (
const T &val,
const Array<T> &
array);
236 template<
class T>
bool allNE (
const Array<T> &
array,
const T &val);
237 template<
class T>
bool allNE (
const T &val,
const Array<T> &
array);
247 template<
class T>
bool allAND (
const Array<T> &
array,
const T &val);
248 template<
class T>
bool allAND (
const T &val,
const Array<T> &
array);
249 template<
class T>
bool allOR (
const Array<T> &
array,
const T &val);
250 template<
class T>
bool allOR (
const T &val,
const Array<T> &
array);
258 {
return a.
size() <= 1 || allEQ(*a.
data(), a); }
278 template<
class T>
LogicalArray operator <= (const Array<T> &
array,
const T &val);
279 template<
class T>
LogicalArray operator <= (const T &val, const Array<T> &
array);
365 template<
class T>
bool anyNear (
const Array<T> &
array,
const T &val,
double tol);
366 template<
class T>
bool anyNear (
const T &val,
const Array<T> &
array,
double tol);
367 template<
class T>
bool anyNearAbs (
const Array<T> &
array,
const T &val,
369 template<
class T>
bool anyNearAbs (
const T &val,
const Array<T> &
array,
374 template<
class T>
bool anyAND (
const Array<T> &
array,
const T &val);
375 template<
class T>
bool anyAND (
const T &val,
const Array<T> &
array);
376 template<
class T>
bool anyOR (
const Array<T> &
array,
const T &val);
377 template<
class T>
bool anyOR (
const T &val,
const Array<T> &
array);
384 template<
typename Alloc>
386 {
return allEQ (array,
true); }
389 template<
typename Alloc>
391 {
return anyEQ (array,
true); }
448 template<
typename T,
typename RES=
size_t>
455 template<
typename T,
typename RES=
size_t>
463 #include "ArrayLogical.tcc"
A Vector of integers, for indexing into Array<T> objects.
bool allNearAbs(const C1 &l, const C2 &r, U tolerance)
Test if all elements of the containers are absolutely near each other.
bool allNear(const C1 &l, const C2 &r, U tolerance)
Test if all elements of the containers are relatively near each other.
size_t nelements() const
How many elements does this array have? Product of all axis lengths.
size_t ntrue(const Array< T > &array)
Bool anyLT(const TableVector< T > &l, const TableVector< T > &r)
TableExprNode array(const TableExprNode &values, const TableExprNodeSet &shape)
Create an array of the given shape and fill it with the values.
Bool near(const GaussianBeam &left, const GaussianBeam &other, const Double relWidthTol, const Quantity &absPaTol)
bool anyTrue(const Array< bool, Alloc > &array)
Is any element true?
LatticeExprNode ntrue(const LatticeExprNode &expr)
virtual bool operator()(const Array< T > &arr) const override
Logical functor to test if all elements are true.
bool operator==(const casacore_allocator< T, ALIGNMENT > &, const casacore_allocator< T, ALIGNMENT > &)
Logical functor to test if any elements are true.
LatticeExprNode operator>=(const LatticeExprNode &left, const LatticeExprNode &right)
Bool anyNE(const TableVector< T > &l, const TableVector< T > &r)
bool allTrue(const Array< bool, Alloc > &array)
Are all elements true?
LatticeExprNode nfalse(const LatticeExprNode &expr)
LatticeExprNode operator!(const LatticeExprNode &expr)
bool allSame(const Array< T > &a)
Test if all elements in an array are the same.
TableExprNode isInf(const TableExprNode &node)
virtual RES operator()(const Array< T > &arr) const override
Logical functor to count the number of false elements.
Basic class for math on Array objects.
TableExprNode isFinite(const TableExprNode &node)
Function to test if a scalar or array is finite.
Bool anyGE(const TableVector< T > &l, const TableVector< T > &r)
Bool anyGT(const TableVector< T > &l, const TableVector< T > &r)
LatticeExprNode operator>(const LatticeExprNode &left, const LatticeExprNode &right)
virtual RES operator()(const Array< T > &arr) const override
virtual bool operator()(const Array< T > &arr) const override
Bool anyEQ(const TableVector< T > &l, const TableVector< T > &r)
TableExprNode nearAbs(const TableExprNode &left, const TableExprNode &right)
LatticeExprNode isNaN(const LatticeExprNode &expr)
Test if a value is a NaN.
bool operator!=(const casacore_allocator< T, ALIGNMENT > &, const casacore_allocator< T, ALIGNMENT > &)
Logical functor to count the number of true elements.
Bool anyLE(const TableVector< T > &l, const TableVector< T > &r)
Element by element comparisons between the "l" and "r" table vectors.
LatticeExprNode operator||(const LatticeExprNode &left, const LatticeExprNode &right)
T * data()
Get a pointer to the beginning of the array.
LatticeExprNode operator&&(const LatticeExprNode &left, const LatticeExprNode &right)
Logical binary operators.