29 #ifndef CASA_COMPLEX_H
30 #define CASA_COMPLEX_H
34 #include <casacore/casa/aips.h>
35 #include <casacore/casa/BasicSL/Complexfwd.h>
36 #include <casacore/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<=;
DComplex fmod(const DComplex &in, const DComplex &f)
fmod
Double fabs(const DComplex &val)
Additional complex mathematical functions.
DComplex erf(const DComplex &in)
Error function.
DComplex atan(const DComplex &in)
Inverse trigonometry.
Bool near(const Complex &val1, const Complex &val2, Double tol=1.0e-5)
The near functions.
std::complex< Float > Complex
std::complex< Double > DComplex
const Double c
Fundamental physical constants (SI units):
this file contains all the compiler specific defines
LatticeExprNode isNaN(const LatticeExprNode &expr)
Test if a value is a NaN.
LatticeExprNode asin(const LatticeExprNode &expr)
LatticeExprNode fmod(const LatticeExprNode &left, const LatticeExprNode &right)
LatticeExprNode operator>(const LatticeExprNode &left, const LatticeExprNode &right)
LatticeExprNode acos(const LatticeExprNode &expr)
LatticeExprNode max(const LatticeExprNode &left, const LatticeExprNode &right)
TableExprNode isFinite(const TableExprNode &node)
Function to test if a scalar or array is finite.
LatticeExprNode atan(const LatticeExprNode &expr)
bool allNearAbs(const C1 &l, const C2 &r, U tolerance)
Test if all elements of the containers are absolutely near each other.
TableExprNode nearAbs(const TableExprNode &left, const TableExprNode &right)
TableExprNode isInf(const TableExprNode &node)
LatticeExprNode abs(const LatticeExprNode &expr)
Numerical 1-argument functions which result in a real number regardless of input expression type.
T norm(const TableVector< T > &tv)
LatticeExprNode atan2(const LatticeExprNode &left, const LatticeExprNode &right)
Numerical 2-argument functions.
LatticeExprNode operator<(const LatticeExprNode &left, const LatticeExprNode &right)
LatticeExprNode operator>=(const LatticeExprNode &left, const LatticeExprNode &right)
bool Bool
Define the standard types used by Casacore.
bool allNear(const C1 &l, const C2 &r, U tolerance)
Test if all elements of the containers are relatively near each other.
LatticeExprNode floor(const LatticeExprNode &expr)
Bool near(const GaussianBeam &left, const GaussianBeam &other, const Double relWidthTol, const Quantity &absPaTol)
LatticeExprNode operator<=(const LatticeExprNode &left, const LatticeExprNode &right)
LatticeExprNode ceil(const LatticeExprNode &expr)
Define real & complex conjugation for non-complex types and put comparisons into std namespace.
DComplex asin(const DComplex &in)
Complex cube(const Complex &val)
Complex operator*(const Complex &val, Double f)
QMath and scimath need these operators * and /.
DComplex erfc(const DComplex &in)
DComplex operator+(const Complex &c, const DComplex &d)
DComplex atan2(const DComplex &in, const DComplex &t2)
DComplex operator+(const DComplex &d, const Complex &c)
ArrayMath::pow needs this pow function.
DComplex min(const DComplex &x, const DComplex &y)
Complex operator/(Int f, const Complex &val)
DComplex cube(const DComplex &val)
Complex operator*(const Complex &val, Int f)
These operators are useful, otherwise both Float and Double are applicable for Ints.
Complex min(const Complex &x, const Complex &y)
Complex operator/(const Complex &val, Double f)
DComplex ceil(const DComplex &x)
DComplex floor(const DComplex &x)
DComplex operator-(const DComplex &d, const Complex &c)
Complex ceil(const Complex &x)
Bool nearAbs(const Complex &val1, const Complex &val2, Double tol=1.0e-5)
DComplex acos(const DComplex &in)
DComplex operator-(const Complex &c, const DComplex &d)
Complex operator*(Int f, const Complex &val)
Complex operator/(Double f, const Complex &val)
DComplex square(const DComplex &val)
Complex floor(const Complex &x)
Complex operator/(const Complex &val, Int f)
Complex operator*(Double f, const Complex &val)
Complex square(const Complex &val)