v1.0
|
a Code for the Combination of Indirect and Direct Constraints on High Energy Physics Models
|
|
Go to the documentation of this file.
8 #ifndef GSLPP_COMPLEX_H
10 #include <gsl/gsl_sf.h>
43 return ::fabs(
imag()/
real()) < GSLEPS;
49 return ::fabs(
real()/
imag()) < GSLEPS;
120 return const_cast<gsl_complex*>(&
_complex);
133 complex::operator gsl_complex& ()
138 complex::operator
const gsl_complex& ()
const
145 double absim = ::fabs(z.
imag());
146 output << z.
real() << (z.
imag() < 0.?
"-" :
"+");
148 output << fabs(z.
imag()) <<
"*";
163 GSL_SET_COMPLEX(&
_complex, GSL_REAL(*z), GSL_IMAG(*z));
169 GSL_SET_COMPLEX(&
_complex, GSL_REAL(z), GSL_IMAG(z));
187 gsl_complex t = gsl_complex_negative(
_complex);
241 gsl_complex rl = gsl_complex_add_real(
_complex,a);
247 gsl_complex rl = gsl_complex_sub_real(
_complex,a);
253 gsl_complex rl = gsl_complex_mul_real(
_complex,a);
259 gsl_complex rl = gsl_complex_div_real(
_complex,a);
290 gsl_complex t = gsl_complex_conjugate(
_complex);
296 gsl_complex t = gsl_complex_inverse(
_complex);
372 gsl_sf_result re, im;
373 gsl_sf_complex_dilog_xy_e(z.
real(), z.
imag(), &re, &im);
374 return complex(re.val, im.val,
false);
bool is_imag() const
Check if complex number is purely imaginary.
complex cos(const complex &z)
complex arccoth(const complex &z)
complex sec(const complex &z)
complex sinh(const complex &z)
complex arccot(const complex &z)
complex arctan(const complex &z)
complex & operator=(const complex &z)
Assignment operator for a complex variable of complex type.
complex dilog(const complex &z)
complex arctanh(const complex &z)
complex sin(const complex &z)
complex csch(const complex &z)
complex arccosh(const complex &z)
double log_of_abs() const
complex arcsech(const complex &z)
A class for defining operations on and functions of complex numbers.
gsl_complex * as_gsl_type_ptr() const
complex log(const complex &z)
complex tanh(const complex &z)
complex & operator+=(const complex &z1)
Addition assignment operator for a complex number.
complex arccos(const complex &z)
complex operator+(const double &x1, const complex &z2)
complex operator/(const complex &z1) const
Division operator for a complex number.
complex operator+(const complex &z1) const
Addition operator for a complex number.
complex arccsc(const complex &z)
complex arcsec(const complex &z)
const double & imag() const
complex cosh(const complex &z)
complex conjugate() const
complex tan(const complex &z)
bool operator!=(const complex &z1) const
Inequivalence operator between two complex variables.
complex operator*(const complex &z1) const
Multiplication operator for a complex number.
complex()
Default constructor for the complex class.
complex pow(const complex &z1, const complex &z2)
complex sqrt(const complex &z)
static const complex & i()
complex arcsinh(const complex &z)
bool operator==(const complex &z1) const
Equivalence operator between two complex variables.
void assign(const double &real, const double &imag, bool polar)
complex arcsin(const complex &z)
complex & operator*=(const complex &z1)
Muliplication assignment operator for a complex number.
complex arccsch(const complex &z)
complex operator/(const double &x1, const complex &z2)
complex csc(const complex &z)
complex log10(const complex &z)
virtual ~complex()
Default destructor for the complex class.
std::ostream & operator<<(std::ostream &output, const complex &z)
complex operator-() const
Unary minus operator for a complex number.
const double & real() const
complex & operator/=(const complex &z1)
Division assignment operator for a complex number.
complex cot(const complex &z)
complex operator*(const double &x1, const complex &z2)
complex sech(const complex &z)
bool is_real() const
Check if complex number is purely real.
gsl_complex & as_gsl_type()
complex exp(const complex &z)
complex & operator-=(const complex &z1)
Subtraction assignment operator for a complex number.
Complex number, vector and matrix manipulation using GSL.
complex coth(const complex &z)
complex operator-(const double &x1, const complex &z2)