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<=;
bool allNearAbs(const C1 &l, const C2 &r, U tolerance)
Test if all elements of the containers are absolutely near each other.
Complex floor(const Complex &x)
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
Complex operator*(Double f, const Complex &val)
LatticeExprNode max(const LatticeExprNode &left, const LatticeExprNode &right)
DComplex min(const DComplex &x, const DComplex &y)
Bool near(const GaussianBeam &left, const GaussianBeam &other, const Double relWidthTol, const Quantity &absPaTol)
Complex operator*(Int f, const Complex &val)
DComplex operator+(const Complex &c, const DComplex &d)
Complex operator*(const Complex &val, Double f)
QMath and scimath need these operators * and /.
LatticeExprNode floor(const LatticeExprNode &expr)
DComplex operator-(const DComplex &d, const Complex &c)
LatticeExprNode operator>=(const LatticeExprNode &left, const LatticeExprNode &right)
Complex square(const Complex &val)
DComplex operator+(const DComplex &d, const Complex &c)
ArrayMath::pow needs this pow function.
DComplex operator-(const Complex &c, const DComplex &d)
DComplex ceil(const DComplex &x)
TableExprNode isInf(const TableExprNode &node)
Complex operator/(const Complex &val, Double f)
std::complex< Double > DComplex
LatticeExprNode abs(const LatticeExprNode &expr)
Numerical 1-argument functions which result in a real number regardless of input expression type...
Complex operator*(const Complex &val, Int f)
These operators are useful, otherwise both Float and Double are applicable for Ints.
LatticeExprNode operator<=(const LatticeExprNode &left, const LatticeExprNode &right)
DComplex cube(const DComplex &val)
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.
Complex operator/(Int f, const Complex &val)
LatticeExprNode operator>(const LatticeExprNode &left, const LatticeExprNode &right)
DComplex floor(const DComplex &x)
LatticeExprNode atan2(const LatticeExprNode &left, const LatticeExprNode &right)
Numerical 2-argument functions.
Complex min(const Complex &x, const Complex &y)
Complex operator/(const Complex &val, Int f)
Double fabs(const DComplex &val)
Additional complex mathematical functions.
Complex operator/(Double f, const Complex &val)
Complex cube(const Complex &val)
LatticeExprNode fmod(const LatticeExprNode &left, const LatticeExprNode &right)
LatticeExprNode asin(const LatticeExprNode &expr)
const Double e
e and functions thereof:
const Double c
Fundamental physical constants (SI units):
LatticeExprNode acos(const LatticeExprNode &expr)
TableExprNode nearAbs(const TableExprNode &left, const TableExprNode &right)
DComplex square(const DComplex &val)
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)
TableExprNode norm(const TableExprNode &node)
Complex ceil(const Complex &x)
#define casacore
<X11/Intrinsic.h> #defines true, false, casacore::Bool, and String.