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); }
229 #if defined(NEEDS_LOG10_COMPLEX) 282 {
return near(val1, val2, tol); }
285 {
return near(val1, val2, tol); }
288 {
return nearAbs(val1, val2, tol); }
291 {
return nearAbs(val1, val2, tol); }
299 {
return x >= y ? x : y; }
301 {
return x >= y ? x : y; }
304 {
return x <= y ? x : y; }
306 {
return x <= y ? x : y; }
362 inline float conj(
float x) {
return x; }
363 inline double conj(
double x) {
return x; }
364 #if !(defined(AIPS_CXX11) || (defined(__APPLE_CC__) && __APPLE_CC__ > 5621)) 365 inline float real(
float x) {
return x; }
366 inline double real(
double x) {
return x; }
367 inline float imag(
float ) {
return 0; }
368 inline double imag(
double ) {
return 0; }
370 using casacore::operator>;
371 using casacore::operator>=;
372 using casacore::operator<;
373 using casacore::operator<=;
LatticeExprNode log10(const LatticeExprNode &expr)
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 imag(const LatticeExprNode &expr)
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)
Define real & complex conjugation for non-complex types and put comparisons into std namespace...
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)
We have to explicitly implement these for different type operands.
LatticeExprNode conj(const LatticeExprNode &expr)
DComplex cube(const DComplex &val)
Float pow(Float f1, Float f2)
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 pow(const Complex &val, Double p)
The log10 should be in stl.
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)
this file contains all the compiler specific defines
Complex ceil(const Complex &x)
LatticeExprNode real(const LatticeExprNode &expr)