Go to the documentation of this file.
28 #ifndef CASA_ARRAYLOGICAL_H
29 #define CASA_ARRAYLOGICAL_H
32 #include <casacore/casa/aips.h>
33 #include <casacore/casa/Arrays/Array.h>
34 #include <casacore/casa/Arrays/LogiArray.h>
35 #include <casacore/casa/Arrays/ArrayMathBase.h>
40 template <
class T>
class Vector;
41 template <
class T>
class Matrix;
42 template <
class T>
class Cube;
124 template<
typename T,
typename CompareOperator>
127 template<
typename T,
typename CompareOperator>
128 bool arrayCompareAll (
const Array<T>& left, T right,
130 template<
typename T,
typename CompareOperator>
131 bool arrayCompareAll (T left,
const Array<T>& right,
137 template<
typename T,
typename CompareOperator>
140 template<
typename T,
typename CompareOperator>
141 bool arrayCompareAny (
const Array<T>& left, T right,
143 template<
typename T,
typename CompareOperator>
144 bool arrayCompareAny (T left,
const Array<T>& right,
265 {
return a.
size() <= 1 || allEQ(*a.
data(), a); }
448 template<
typename T,
typename RES=
size_t>
454 template<
typename T,
typename RES=
size_t>
465 #ifndef CASACORE_NO_AUTO_TEMPLATES
466 #include <casacore/casa/Arrays/ArrayLogical.tcc>
467 #endif //# CASACORE_NO_AUTO_TEMPLATES
Bool anyNE(const TableVector< T > &l, const TableVector< T > &r)
virtual RES operator()(const Array< T > &arr) const
Bool anyOR(const Array< T > &l, const Array< T > &r)
Bool allNear(const Array< T > &l, const Array< T > &r, Double tol)
Basic class for math on Array objects.
A Vector of integers, for indexing into Array<T> objects.
Bool anyEQ(const Array< T > &l, const Array< T > &r)
LogicalArray operator!(const Array< T > &l)
Logical negation of an array.
virtual Bool operator()(const Array< T > &arr) const
Bool anyAND(const Array< T > &l, const Array< T > &r)
This only makes sense if the array element type is logical valued.
LogicalArray nearAbs(const Array< T > &l, const Array< T > &r, Double tol)
LogicalArray operator||(const Array< T > &l, const Array< T > &r)
bool operator!=(const casacore_allocator< T, ALIGNMENT > &, const casacore_allocator< T, ALIGNMENT > &)
virtual RES operator()(const Array< T > &arr) const
Bool anyEQ(const TableVector< T > &l, const TableVector< T > &r)
Array< Bool > partialAllTrue(const Array< Bool > &array, const IPosition &collapseAxes)
The same functions as above, but for selected axes.
Bool allSame(const Array< T > &a)
Test if all elements in an array are the same.
TableExprNode isFinite(const TableExprNode &node)
Function to test if a scalar or array is finite.
Bool allGE(const Array< T > &l, const Array< T > &r)
bool allNear(const C1 &l, const C2 &r, U tolerance)
Test if all elements of the containers are relatively near each other.
LogicalArray isInf(const Array< T > &array)
Bool allGT(const Array< T > &l, const Array< T > &r)
Array< uInt > partialNFalse(const Array< T > &array, const IPosition &collapseAxes)
LatticeExprNode nfalse(const LatticeExprNode &expr)
LatticeExprNode operator>=(const LatticeExprNode &left, const LatticeExprNode &right)
Array< uInt > partialNTrue(const Array< T > &array, const IPosition &collapseAxes)
The same functions as above, but determine ntrue and nfalse for the given axes only.
LogicalArray near(const Array< T > &l, const Array< T > &r, Double tol)
Bool anyGT(const TableVector< T > &l, const TableVector< T > &r)
bool arrayCompareAny(const Array< T > &left, const Array< T > &right, CompareOperator op)
Determine if the comparisons between corresponding array elements yield True.
LatticeExprNode operator<(const LatticeExprNode &left, const LatticeExprNode &right)
Bool anyNearAbs(const Array< T > &l, const Array< T > &r, Double tol)
TableExprNode isInf(const TableExprNode &node)
Bool anyLT(const Array< T > &l, const Array< T > &r)
Bool anyTrue(const Array< Bool > &array)
Is any element true?
T * data()
Get a pointer to the beginning of the array.
LogicalArray operator&&(const Array< T > &l, const Array< T > &r)
This only makes sense if the array element type is logical valued.
Bool anyGT(const Array< T > &l, const Array< T > &r)
bool operator==(const casacore_allocator< T, ALIGNMENT > &, const casacore_allocator< T, ALIGNMENT > &)
Bool anyNE(const Array< T > &l, const Array< T > &r)
Array< Bool > partialAnyTrue(const Array< Bool > &array, const IPosition &collapseAxes)
Logical operations for Arrays.
LogicalArray operator==(const Array< T > &l, const Array< T > &r)
LogicalArray operator<=(const Array< T > &l, const Array< T > &r)
Element by element comparisons between the "l" and "r" arrays.
Bool anyGE(const Array< T > &l, const Array< T > &r)
LatticeExprNode operator&&(const LatticeExprNode &left, const LatticeExprNode &right)
Logical binary operators.
Bool allNearAbs(const Array< T > &l, const Array< T > &r, Double tol)
virtual Bool operator()(const Array< T > &arr) const
LatticeExprNode operator||(const LatticeExprNode &left, const LatticeExprNode &right)
Bool near(const GaussianBeam &left, const GaussianBeam &other, const Double relWidthTol, const Quantity &absPaTol)
size_t ntrue(const Array< T > &array)
LogicalArray operator<(const Array< T > &l, const Array< T > &r)
LatticeExprNode operator!(const LatticeExprNode &expr)
this file contains all the compiler specific defines
Bool anyLE(const TableVector< T > &l, const TableVector< T > &r)
Element by element comparisons between the "l" and "r" table vectors.
TableExprNode array(const TableExprNode &values, const TableExprNodeSet &shape)
Create an array of the given shape and fill it with the values.
LatticeExprNode ntrue(const LatticeExprNode &expr)
Bool anyGE(const TableVector< T > &l, const TableVector< T > &r)
LogicalArray operator!=(const Array< T > &l, const Array< T > &r)
Bool allLT(const Array< T > &l, const Array< T > &r)
Bool allLE(const Array< T > &l, const Array< T > &r)
Element by element comparisons between the "l" and "r" arrays.
Bool anyLE(const Array< T > &l, const Array< T > &r)
Element by element comparisons between the "l" and "r" arrays.
LogicalArray isFinite(const Array< T > &array)
Bool anyNear(const Array< T > &l, const Array< T > &r, Double tol)
LatticeExprNode isNaN(const LatticeExprNode &expr)
Test if a value is a NaN.
template <class T, class U> class vector;
LatticeExprNode operator<=(const LatticeExprNode &left, const LatticeExprNode &right)
bool Bool
Define the standard types used by Casacore.
bool arrayCompareAll(const Array< T > &left, const Array< T > &right, CompareOperator op)
Determine if the comparisons between corresponding array elements yield True.
size_t nfalse(const Array< T > &array)
Determine the number of true or false elements.
Bool allEQ(const Array< T > &l, const Array< T > &r)
Bool allAND(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)
LatticeExprNode operator>(const LatticeExprNode &left, const LatticeExprNode &right)
Bool allTrue(const Array< Bool > &array)
Are all elements true?
Bool allOR(const Array< T > &l, const Array< T > &r)
LogicalArray operator>(const Array< T > &l, const Array< T > &r)
bool allNearAbs(const C1 &l, const C2 &r, U tolerance)
Test if all elements of the containers are absolutely near each other.
LogicalArray isNaN(const Array< T > &array)
Element by element test for NaN or (In)finity.
Bool anyLT(const TableVector< T > &l, const TableVector< T > &r)
Bool allNE(const Array< T > &l, const Array< T > &r)
TableExprNode nearAbs(const TableExprNode &left, const TableExprNode &right)