29 #ifndef CASA_COMPLEX_H
30 #define CASA_COMPLEX_H
177 {
return left==right ?
True :
norm(left) >=
norm(right); }
181 {
return left==right ?
True :
norm(left) <=
norm(right); }
274 {
return near(val1, val2, tol); }
277 {
return near(val1, val2, tol); }
280 {
return nearAbs(val1, val2, tol); }
283 {
return nearAbs(val1, val2, tol); }
291 {
return x >= y ? x : y; }
293 {
return x >= y ? x : y; }
296 {
return x <= y ? x : y; }
298 {
return x <= y ? x : y; }
353 inline float conj(
float x) {
return x; }
354 inline double conj(
double x) {
return x; }
355 using casacore::operator>;
356 using casacore::operator>=;
357 using casacore::operator<;
358 using casacore::operator<=;
Complex operator*(Double f, const Complex &val)
Complex operator/(const Complex &val, Int f)
bool allNearAbs(const C1 &l, const C2 &r, U tolerance)
Test if all elements of the containers are absolutely near each other.
DComplex operator-(const DComplex &d, const Complex &c)
bool allNear(const C1 &l, const C2 &r, U tolerance)
Test if all elements of the containers are relatively near each other.
std::complex< Float > Complex
LatticeExprNode max(const LatticeExprNode &left, const LatticeExprNode &right)
Complex operator*(const Complex &val, Double f)
QMath and scimath need these operators * and /.
Double fabs(const DComplex &val)
Additional complex mathematical functions.
Bool near(const GaussianBeam &left, const GaussianBeam &other, const Double relWidthTol, const Quantity &absPaTol)
Complex operator/(Double f, const Complex &val)
DComplex min(const DComplex &x, const DComplex &y)
LatticeExprNode floor(const LatticeExprNode &expr)
LatticeExprNode operator>=(const LatticeExprNode &left, const LatticeExprNode &right)
DComplex operator+(const DComplex &d, const Complex &c)
ArrayMath::pow needs this pow function.
DComplex cube(const DComplex &val)
Complex cube(const Complex &val)
TableExprNode isInf(const TableExprNode &node)
DComplex ceil(const DComplex &x)
DComplex operator-(const Complex &c, const DComplex &d)
std::complex< Double > DComplex
LatticeExprNode abs(const LatticeExprNode &expr)
Numerical 1-argument functions which result in a real number regardless of input expression type...
DComplex square(const DComplex &val)
LatticeExprNode operator<=(const LatticeExprNode &left, const LatticeExprNode &right)
Complex operator*(Int f, const Complex &val)
Complex operator*(const Complex &val, Int f)
These operators are useful, otherwise both Float and Double are applicable for Ints.
TableExprNode isFinite(const TableExprNode &node)
Function to test if a scalar or array is finite.
LatticeExprNode atan(const LatticeExprNode &expr)
bool Bool
Define the standard types used by Casacore.
DComplex operator+(const Complex &c, const DComplex &d)
Complex operator/(const Complex &val, Double f)
Complex min(const Complex &x, const Complex &y)
LatticeExprNode operator>(const LatticeExprNode &left, const LatticeExprNode &right)
LatticeExprNode atan2(const LatticeExprNode &left, const LatticeExprNode &right)
Numerical 2-argument functions.
Complex operator/(Int f, const Complex &val)
Complex floor(const Complex &x)
DComplex floor(const DComplex &x)
LatticeExprNode fmod(const LatticeExprNode &left, const LatticeExprNode &right)
LatticeExprNode asin(const LatticeExprNode &expr)
const Double e
e and functions thereof:
Complex square(const Complex &val)
const Double c
Fundamental physical constants (SI units):
LatticeExprNode acos(const LatticeExprNode &expr)
TableExprNode nearAbs(const TableExprNode &left, const TableExprNode &right)
T norm(const TableVector< T > &tv)
LatticeExprNode operator<(const LatticeExprNode &left, const LatticeExprNode &right)
LatticeExprNode isNaN(const LatticeExprNode &expr)
Test if a value is a NaN.
LatticeExprNode ceil(const LatticeExprNode &expr)
Complex ceil(const Complex &x)