ccgsl 2.7.2
C++wrappersforGnuScientificLibrary
gsl::complex Class Reference

This class handles complex numbers. More...

#include <complex.hpp>

Inheritance diagram for gsl::complex:
Inheritance graph
Collaboration diagram for gsl::complex:
Collaboration graph

Public Member Functions

 complex ()
 The default constructor is only really useful for assigning to. More...
 
 complex (double *dat)
 Allow construction from raw data. More...
 
 complex (double const real, double const imag)
 Allow construction from real and imaginary values. More...
 
 complex (std::complex< double > const &z)
 Allow construction from a std::complex<double>. More...
 
 complex (gsl_complex const &z)
 Constructor from base class. More...
 
 operator std::complex< double > () const
 Convert to std::complex<double> More...
 
gsl_complex & get ()
 Get the base class object. More...
 
gsl_complex const & get () const
 Get the base class object. More...
 
void set_complex (double x, double y)
 C++ version of GSL_SET_COMPLEX(). More...
 
double real () const
 C++ version of GSL_REAL(). More...
 
double imag () const
 C++ version of GSL_IMAG(). More...
 
void set_real (double x)
 C++ version of GSL_SET_REAL(). More...
 
void set_imag (double y)
 C++ version of GSL_SET_IMAG(). More...
 
bool operator== (complex const &z) const
 A complex object must be less than comparable so that it can be used as a container value type. More...
 
bool operator!= (complex const &z) const
 A complex object must be less than comparable so that it can be used as a container value type. More...
 
bool operator< (complex const &z) const
 A complex object must be less than comparable so that it can be used as a container value type. More...
 
bool operator> (complex const &z) const
 A complex object must be less than comparable so that it can be used as a container value type. More...
 
bool operator<= (complex const &z) const
 A complex object must be less than comparable so that it can be used as a container value type. More...
 
bool operator>= (complex const &z) const
 A complex object must be less than comparable so that it can be used as a container value type. More...
 

Static Public Member Functions

static complex rect (double x, double y)
 C++ version of gsl_complex_rect(). More...
 
static complex polar (double r, double theta)
 C++ version of gsl_complex_rect(). More...
 
static double arg (complex const &z)
 C++ version of gsl_complex_arg(). More...
 
static double abs (complex const &z)
 C++ version of gsl_complex_abs(). More...
 
static double abs2 (complex const &z)
 C++ version of gsl_complex_abs2(). More...
 
static double logabs (complex const &z)
 C++ version of gsl_complex_logabs(). More...
 
static complex add (complex const &a, complex const &b)
 C++ version of gsl_complex_add(). More...
 
static complex sub (complex const &a, complex const &b)
 C++ version of gsl_complex_sub(). More...
 
static complex mul (complex const &a, complex const &b)
 C++ version of gsl_complex_mul(). More...
 
static complex div (complex const &a, complex const &b)
 C++ version of gsl_complex_div(). More...
 
static complex add_real (complex const &a, double x)
 C++ version of gsl_complex_add_real(). More...
 
static complex sub_real (complex const &a, double x)
 C++ version of gsl_complex_sub_real(). More...
 
static complex mul_real (complex const &a, double x)
 C++ version of gsl_complex_mul_real(). More...
 
static complex div_real (complex const &a, double x)
 C++ version of gsl_complex_div_real(). More...
 
static complex add_imag (complex const &a, double y)
 C++ version of gsl_complex_add_imag(). More...
 
static complex sub_imag (complex const &a, double y)
 C++ version of gsl_complex_sub_imag(). More...
 
static complex mul_imag (complex const &a, double y)
 C++ version of gsl_complex_mul_imag(). More...
 
static complex div_imag (complex const &a, double y)
 C++ version of gsl_complex_div_imag(). More...
 
static complex conjugate (complex const &z)
 C++ version of gsl_complex_conjugate(). More...
 
static complex inverse (complex const &a)
 C++ version of gsl_complex_inverse(). More...
 
static complex negative (complex const &a)
 C++ version of gsl_complex_negative(). More...
 
static complex sqrt (complex const &z)
 C++ version of gsl_complex_sqrt(). More...
 
static complex sqrt_real (double x)
 C++ version of gsl_complex_sqrt_real(). More...
 
static complex pow (complex const &a, complex const &b)
 C++ version of gsl_complex_pow(). More...
 
static complex pow_real (complex const &a, double b)
 C++ version of gsl_complex_pow_real(). More...
 
static complex exp (complex const &a)
 C++ version of gsl_complex_exp(). More...
 
static complex log (complex const &a)
 C++ version of gsl_complex_log(). More...
 
static complex log10 (complex const &a)
 C++ version of gsl_complex_log10(). More...
 
static complex log_b (complex const &a, complex const &b)
 C++ version of gsl_complex_log_b(). More...
 
static complex sin (complex const &a)
 C++ version of gsl_complex_sin(). More...
 
static complex cos (complex const &a)
 C++ version of gsl_complex_cos(). More...
 
static complex sec (complex const &a)
 C++ version of gsl_complex_sec(). More...
 
static complex csc (complex const &a)
 C++ version of gsl_complex_csc(). More...
 
static complex tan (complex const &a)
 C++ version of gsl_complex_tan(). More...
 
static complex cot (complex const &a)
 C++ version of gsl_complex_cot(). More...
 
static complex arcsin (complex const &a)
 C++ version of gsl_complex_arcsin(). More...
 
static complex arcsin_real (double a)
 C++ version of gsl_complex_arcsin_real(). More...
 
static complex arccos (complex const &a)
 C++ version of gsl_complex_arccos(). More...
 
static complex arccos_real (double a)
 C++ version of gsl_complex_arccos_real(). More...
 
static complex arcsec (complex const &a)
 C++ version of gsl_complex_arcsec(). More...
 
static complex arcsec_real (double a)
 C++ version of gsl_complex_arcsec_real(). More...
 
static complex arccsc (complex const &a)
 C++ version of gsl_complex_arccsc(). More...
 
static complex arccsc_real (double a)
 C++ version of gsl_complex_arccsc_real(). More...
 
static complex arctan (complex const &a)
 C++ version of gsl_complex_arctan(). More...
 
static complex arccot (complex const &a)
 C++ version of gsl_complex_arccot(). More...
 
static complex sinh (complex const &a)
 C++ version of gsl_complex_sinh(). More...
 
static complex cosh (complex const &a)
 C++ version of gsl_complex_cosh(). More...
 
static complex sech (complex const &a)
 C++ version of gsl_complex_sech(). More...
 
static complex csch (complex const &a)
 C++ version of gsl_complex_csch(). More...
 
static complex tanh (complex const &a)
 C++ version of gsl_complex_tanh(). More...
 
static complex coth (complex const &a)
 C++ version of gsl_complex_coth(). More...
 
static complex arcsinh (complex const &a)
 C++ version of gsl_complex_arcsinh(). More...
 
static complex arccosh (complex const &a)
 C++ version of gsl_complex_arccosh(). More...
 
static complex arccosh_real (double a)
 C++ version of gsl_complex_arccosh_real(). More...
 
static complex arcsech (complex const &a)
 C++ version of gsl_complex_arcsech(). More...
 
static complex arccsch (complex const &a)
 C++ version of gsl_complex_arccsch(). More...
 
static complex arctanh (complex const &a)
 C++ version of gsl_complex_arctanh(). More...
 
static complex arctanh_real (double a)
 C++ version of gsl_complex_arctanh_real(). More...
 
static complex arccoth (complex const &a)
 C++ version of gsl_complex_arccoth(). More...
 

Friends

class complex_ptr
 
class complex_ref
 
class vector_complex
 
class matrix_complex
 

Detailed Description

This class handles complex numbers.

There is an ambiguity in translating gsl_complex to C++: gsl_complex is a struct and so should be represented by a C++ class. But gsl_complex is also used like a namespace and so it would be nice to have a C++ namespace gsl:: complex. However, we cannot have both. The compromise is to use static complex class functions. But, since we cannot use

using namespace gsl::complex
This class handles complex numbers.
Definition: complex.hpp:42

and similar namespace operations with gsl::complex, we also define a namespace gsl::cpx with the same functions, again defined inline for efficiency.

Definition at line 42 of file complex.hpp.

Constructor & Destructor Documentation

◆ complex() [1/5]

◆ complex() [2/5]

gsl::complex::complex ( double *  dat)
inlineexplicit

Allow construction from raw data.

This is mainly for use by the container classes.

Parameters
datRaw data

Definition at line 57 of file complex.hpp.

◆ complex() [3/5]

gsl::complex::complex ( double const  real,
double const  imag 
)
inline

Allow construction from real and imaginary values.

Parameters
realThe real part.
imagThe imaginary part.

Definition at line 65 of file complex.hpp.

References imag(), and real().

◆ complex() [4/5]

gsl::complex::complex ( std::complex< double > const &  z)
inline

Allow construction from a std::complex<double>.

Parameters
zThe std::complex

Definition at line 73 of file complex.hpp.

◆ complex() [5/5]

gsl::complex::complex ( gsl_complex const &  z)
inline

Constructor from base class.

Parameters
zA gsl_complex

Definition at line 84 of file complex.hpp.

Member Function Documentation

◆ abs()

static double gsl::complex::abs ( complex const &  z)
inlinestatic

C++ version of gsl_complex_abs().

Parameters
zA complex number
Returns
The magnitude of z

Definition at line 164 of file complex.hpp.

Referenced by gsl::cpx::abs().

◆ abs2()

static double gsl::complex::abs2 ( complex const &  z)
inlinestatic

C++ version of gsl_complex_abs2().

Parameters
zA complex number
Returns
The square of the magnitude of z

Definition at line 170 of file complex.hpp.

Referenced by gsl::cpx::abs2().

◆ add()

static complex gsl::complex::add ( complex const &  a,
complex const &  b 
)
inlinestatic

C++ version of gsl_complex_add().

Parameters
aA complex number
bA complex to add to a
Returns
The sum

Definition at line 183 of file complex.hpp.

References gsl::sf::mathieu::a(), gsl::sf::mathieu::b(), and complex().

Referenced by gsl::cpx::add().

◆ add_imag()

static complex gsl::complex::add_imag ( complex const &  a,
double  y 
)
inlinestatic

C++ version of gsl_complex_add_imag().

Parameters
aA complex number
yThe imaginary part of a double to add to a
Returns
The sum

Definition at line 247 of file complex.hpp.

References gsl::sf::mathieu::a(), and complex().

Referenced by gsl::cpx::add_imag().

◆ add_real()

static complex gsl::complex::add_real ( complex const &  a,
double  x 
)
inlinestatic

C++ version of gsl_complex_add_real().

Parameters
aA complex number
xA double to add to a
Returns
The sum

Definition at line 215 of file complex.hpp.

References gsl::sf::mathieu::a(), and complex().

Referenced by gsl::cpx::add_real().

◆ arccos()

static complex gsl::complex::arccos ( complex const &  a)
inlinestatic

C++ version of gsl_complex_arccos().

Parameters
aA complex number
Returns
The inverse cosine

Definition at line 414 of file complex.hpp.

References gsl::sf::mathieu::a(), and complex().

Referenced by gsl::cpx::arccos().

◆ arccos_real()

static complex gsl::complex::arccos_real ( double  a)
inlinestatic

C++ version of gsl_complex_arccos_real().

Parameters
aA double
Returns
The inverse cosine

Definition at line 421 of file complex.hpp.

References gsl::sf::mathieu::a(), and complex().

Referenced by gsl::cpx::arccos_real().

◆ arccosh()

static complex gsl::complex::arccosh ( complex const &  a)
inlinestatic

C++ version of gsl_complex_arccosh().

Parameters
aA complex number
Returns
The inverse hypebolic cosine

Definition at line 519 of file complex.hpp.

References gsl::sf::mathieu::a(), and complex().

Referenced by gsl::cpx::arccosh().

◆ arccosh_real()

static complex gsl::complex::arccosh_real ( double  a)
inlinestatic

C++ version of gsl_complex_arccosh_real().

Parameters
aA double
Returns
The inverse hypebolic cosine

Definition at line 526 of file complex.hpp.

References gsl::sf::mathieu::a(), and complex().

Referenced by gsl::cpx::arccosh_real().

◆ arccot()

static complex gsl::complex::arccot ( complex const &  a)
inlinestatic

C++ version of gsl_complex_arccot().

Parameters
aA complex number
Returns
the inverse cotangent

Definition at line 463 of file complex.hpp.

References gsl::sf::mathieu::a(), and complex().

Referenced by gsl::cpx::arccot().

◆ arccoth()

static complex gsl::complex::arccoth ( complex const &  a)
inlinestatic

C++ version of gsl_complex_arccoth().

Parameters
aA complex number
Returns
The inverse hyperbolic cotangent

Definition at line 561 of file complex.hpp.

References gsl::sf::mathieu::a(), and complex().

Referenced by gsl::cpx::arccoth().

◆ arccsc()

static complex gsl::complex::arccsc ( complex const &  a)
inlinestatic

C++ version of gsl_complex_arccsc().

Parameters
aA complex number
Returns
The inverse cosecant

Definition at line 442 of file complex.hpp.

References gsl::sf::mathieu::a(), and complex().

Referenced by gsl::cpx::arccsc().

◆ arccsc_real()

static complex gsl::complex::arccsc_real ( double  a)
inlinestatic

C++ version of gsl_complex_arccsc_real().

Parameters
aA double
Returns
The inverse cosecant

Definition at line 449 of file complex.hpp.

References gsl::sf::mathieu::a(), and complex().

Referenced by gsl::cpx::arccsc_real().

◆ arccsch()

static complex gsl::complex::arccsch ( complex const &  a)
inlinestatic

C++ version of gsl_complex_arccsch().

Parameters
aA complex number
Returns
The inverse hyperbolic cosecant

Definition at line 540 of file complex.hpp.

References gsl::sf::mathieu::a(), and complex().

Referenced by gsl::cpx::arccsch().

◆ arcsec()

static complex gsl::complex::arcsec ( complex const &  a)
inlinestatic

C++ version of gsl_complex_arcsec().

Parameters
aA complex number
Returns
The inverse secant

Definition at line 428 of file complex.hpp.

References gsl::sf::mathieu::a(), and complex().

Referenced by gsl::cpx::arcsec().

◆ arcsec_real()

static complex gsl::complex::arcsec_real ( double  a)
inlinestatic

C++ version of gsl_complex_arcsec_real().

Parameters
aA double
Returns
The inverse secant

Definition at line 435 of file complex.hpp.

References gsl::sf::mathieu::a(), and complex().

Referenced by gsl::cpx::arcsec_real().

◆ arcsech()

static complex gsl::complex::arcsech ( complex const &  a)
inlinestatic

C++ version of gsl_complex_arcsech().

Parameters
aA complex number
Returns
The inverse hyperbolic secant

Definition at line 533 of file complex.hpp.

References gsl::sf::mathieu::a(), and complex().

Referenced by gsl::cpx::arcsech().

◆ arcsin()

static complex gsl::complex::arcsin ( complex const &  a)
inlinestatic

C++ version of gsl_complex_arcsin().

Parameters
aA complex number
Returns
The inverse sine

Definition at line 400 of file complex.hpp.

References gsl::sf::mathieu::a(), and complex().

Referenced by gsl::cpx::arcsin().

◆ arcsin_real()

static complex gsl::complex::arcsin_real ( double  a)
inlinestatic

C++ version of gsl_complex_arcsin_real().

Parameters
aA double
Returns
The inverse sine

Definition at line 407 of file complex.hpp.

References gsl::sf::mathieu::a(), and complex().

Referenced by gsl::cpx::arcsin_real().

◆ arcsinh()

static complex gsl::complex::arcsinh ( complex const &  a)
inlinestatic

C++ version of gsl_complex_arcsinh().

Parameters
aA complex number
Returns
The inverse hypebolic sine

Definition at line 512 of file complex.hpp.

References gsl::sf::mathieu::a(), and complex().

Referenced by gsl::cpx::arcsinh().

◆ arctan()

static complex gsl::complex::arctan ( complex const &  a)
inlinestatic

C++ version of gsl_complex_arctan().

Parameters
aA complex number
Returns
the inverse tangent

Definition at line 456 of file complex.hpp.

References gsl::sf::mathieu::a(), and complex().

Referenced by gsl::cpx::arctan().

◆ arctanh()

static complex gsl::complex::arctanh ( complex const &  a)
inlinestatic

C++ version of gsl_complex_arctanh().

Parameters
aA complex number
Returns
The inverse hyperbolic tangent

Definition at line 547 of file complex.hpp.

References gsl::sf::mathieu::a(), and complex().

Referenced by gsl::cpx::arctanh().

◆ arctanh_real()

static complex gsl::complex::arctanh_real ( double  a)
inlinestatic

C++ version of gsl_complex_arctanh_real().

Parameters
aA double
Returns
The inverse hyperbolic tangent

Definition at line 554 of file complex.hpp.

References gsl::sf::mathieu::a(), and complex().

Referenced by gsl::cpx::arctanh_real().

◆ arg()

static double gsl::complex::arg ( complex const &  z)
inlinestatic

C++ version of gsl_complex_arg().

Parameters
zA complex number
Returns
The argument of z

Definition at line 158 of file complex.hpp.

Referenced by gsl::cpx::arg().

◆ conjugate()

static complex gsl::complex::conjugate ( complex const &  z)
inlinestatic

C++ version of gsl_complex_conjugate().

Parameters
zA complex number
Returns
The complex conjugate

Definition at line 278 of file complex.hpp.

References complex().

Referenced by gsl::cpx::conjugate().

◆ cos()

static complex gsl::complex::cos ( complex const &  a)
inlinestatic

C++ version of gsl_complex_cos().

Parameters
aA complex number
Returns
The cosine

Definition at line 365 of file complex.hpp.

References gsl::sf::mathieu::a(), and complex().

Referenced by gsl::cpx::cos().

◆ cosh()

static complex gsl::complex::cosh ( complex const &  a)
inlinestatic

C++ version of gsl_complex_cosh().

Parameters
aA complex number
Returns
The hyperbolic cosine

Definition at line 477 of file complex.hpp.

References gsl::sf::mathieu::a(), and complex().

Referenced by gsl::cpx::cosh().

◆ cot()

static complex gsl::complex::cot ( complex const &  a)
inlinestatic

C++ version of gsl_complex_cot().

Parameters
aA complex number
Returns
The cotangent

Definition at line 393 of file complex.hpp.

References gsl::sf::mathieu::a(), and complex().

Referenced by gsl::cpx::cot().

◆ coth()

static complex gsl::complex::coth ( complex const &  a)
inlinestatic

C++ version of gsl_complex_coth().

Parameters
aA complex number
Returns
The hyperbolic cotangent

Definition at line 505 of file complex.hpp.

References gsl::sf::mathieu::a(), and complex().

Referenced by gsl::cpx::coth().

◆ csc()

static complex gsl::complex::csc ( complex const &  a)
inlinestatic

C++ version of gsl_complex_csc().

Parameters
aA complex number
Returns
The cosecant

Definition at line 379 of file complex.hpp.

References gsl::sf::mathieu::a(), and complex().

Referenced by gsl::cpx::csc().

◆ csch()

static complex gsl::complex::csch ( complex const &  a)
inlinestatic

C++ version of gsl_complex_csch().

Parameters
aA complex number
Returns
The hyperbolic cosecant

Definition at line 491 of file complex.hpp.

References gsl::sf::mathieu::a(), and complex().

Referenced by gsl::cpx::csch().

◆ div()

static complex gsl::complex::div ( complex const &  a,
complex const &  b 
)
inlinestatic

C++ version of gsl_complex_div().

Parameters
aA complex number
bA complex to divide a by
Returns
The quotient

Definition at line 207 of file complex.hpp.

References gsl::sf::mathieu::a(), gsl::sf::mathieu::b(), and complex().

Referenced by gsl::cpx::div().

◆ div_imag()

static complex gsl::complex::div_imag ( complex const &  a,
double  y 
)
inlinestatic

C++ version of gsl_complex_div_imag().

Parameters
aA complex number
yThe imaginary part of a double to divide a by
Returns
The quotient

Definition at line 271 of file complex.hpp.

References gsl::sf::mathieu::a(), and complex().

Referenced by gsl::cpx::div_imag().

◆ div_real()

static complex gsl::complex::div_real ( complex const &  a,
double  x 
)
inlinestatic

C++ version of gsl_complex_div_real().

Parameters
aA complex number
xA double to divide a by
Returns
The quotient

Definition at line 239 of file complex.hpp.

References gsl::sf::mathieu::a(), and complex().

Referenced by gsl::cpx::div_real().

◆ exp()

static complex gsl::complex::exp ( complex const &  a)
inlinestatic

C++ version of gsl_complex_exp().

Parameters
aA complex number
Returns
The exponential function of z

Definition at line 329 of file complex.hpp.

References gsl::sf::mathieu::a(), and complex().

Referenced by gsl::cpx::exp().

◆ get() [1/2]

◆ get() [2/2]

gsl_complex const & gsl::complex::get ( ) const
inline

Get the base class object.

Returns
the base class object.

Definition at line 111 of file complex.hpp.

◆ imag()

double gsl::complex::imag ( ) const
inline

C++ version of GSL_IMAG().

Returns
The real part of this

Definition at line 142 of file complex.hpp.

Referenced by complex().

◆ inverse()

static complex gsl::complex::inverse ( complex const &  a)
inlinestatic

C++ version of gsl_complex_inverse().

Parameters
aA complex number
Returns
The inverse

Definition at line 285 of file complex.hpp.

References gsl::sf::mathieu::a(), and complex().

Referenced by gsl::cpx::inverse().

◆ log()

static complex gsl::complex::log ( complex const &  a)
inlinestatic

C++ version of gsl_complex_log().

Parameters
aA complex number
Returns
The natural logarithm

Definition at line 336 of file complex.hpp.

References gsl::sf::mathieu::a(), and complex().

Referenced by gsl::cpx::log().

◆ log10()

static complex gsl::complex::log10 ( complex const &  a)
inlinestatic

C++ version of gsl_complex_log10().

Parameters
aA complex number
Returns
The base 10 logarithm

Definition at line 343 of file complex.hpp.

References gsl::sf::mathieu::a(), and complex().

Referenced by gsl::cpx::log10().

◆ log_b()

static complex gsl::complex::log_b ( complex const &  a,
complex const &  b 
)
inlinestatic

C++ version of gsl_complex_log_b().

Parameters
aA complex number
bA complex number
Returns
The complex baseb logarithm

Definition at line 351 of file complex.hpp.

References gsl::sf::mathieu::a(), gsl::sf::mathieu::b(), and complex().

Referenced by gsl::cpx::log_b().

◆ logabs()

static double gsl::complex::logabs ( complex const &  z)
inlinestatic

C++ version of gsl_complex_logabs().

Parameters
zA complex number
Returns
the natural logarithm of the magnitude of z

Definition at line 176 of file complex.hpp.

Referenced by gsl::cpx::logabs().

◆ mul()

static complex gsl::complex::mul ( complex const &  a,
complex const &  b 
)
inlinestatic

C++ version of gsl_complex_mul().

Parameters
aA complex number
bA complex to multiply by a
Returns
The product

Definition at line 199 of file complex.hpp.

References gsl::sf::mathieu::a(), gsl::sf::mathieu::b(), and complex().

Referenced by gsl::cpx::mul().

◆ mul_imag()

static complex gsl::complex::mul_imag ( complex const &  a,
double  y 
)
inlinestatic

C++ version of gsl_complex_mul_imag().

Parameters
aA complex number
yThe imaginary part of a double to multiply a by
Returns
The product

Definition at line 263 of file complex.hpp.

References gsl::sf::mathieu::a(), and complex().

Referenced by gsl::cpx::mul_imag().

◆ mul_real()

static complex gsl::complex::mul_real ( complex const &  a,
double  x 
)
inlinestatic

C++ version of gsl_complex_mul_real().

Parameters
aA complex number
xA double to multiply a by
Returns
The product

Definition at line 231 of file complex.hpp.

References gsl::sf::mathieu::a(), and complex().

Referenced by gsl::cpx::mul_real().

◆ negative()

static complex gsl::complex::negative ( complex const &  a)
inlinestatic

C++ version of gsl_complex_negative().

Parameters
aA complex number
Returns
The negative

Definition at line 292 of file complex.hpp.

References gsl::sf::mathieu::a(), and complex().

Referenced by gsl::cpx::negative().

◆ operator std::complex< double >()

gsl::complex::operator std::complex< double > ( ) const
inlineexplicit

Convert to std::complex<double>

Returns
std::complex<double> version of this (by copying).

Definition at line 93 of file complex.hpp.

◆ operator!=()

bool gsl::complex::operator!= ( complex const &  z) const
inline

A complex object must be less than comparable so that it can be used as a container value type.

This is the inequality operator.

Parameters
zAnother complex
Returns
false or true according as this equals z

Definition at line 576 of file complex.hpp.

◆ operator<()

bool gsl::complex::operator< ( complex const &  z) const
inline

A complex object must be less than comparable so that it can be used as a container value type.

This is the (lexicographic) less than operator.

Parameters
zAnother complex
Returns
true or false according as this is less than z

Definition at line 583 of file complex.hpp.

◆ operator<=()

bool gsl::complex::operator<= ( complex const &  z) const
inline

A complex object must be less than comparable so that it can be used as a container value type.

This is the (lexicographic) less than or equal to operator.

Parameters
zAnother complex
Returns
true or false according as this is less than or equal to z

Definition at line 599 of file complex.hpp.

◆ operator==()

bool gsl::complex::operator== ( complex const &  z) const
inline

A complex object must be less than comparable so that it can be used as a container value type.

This is the equality operator.

Parameters
zAnother complex
Returns
true or false according as this equals z

Definition at line 569 of file complex.hpp.

◆ operator>()

bool gsl::complex::operator> ( complex const &  z) const
inline

A complex object must be less than comparable so that it can be used as a container value type.

This is the (lexicographic) greater than operator.

Parameters
zAnother complex
Returns
true or false according as this is greater than than z

Definition at line 591 of file complex.hpp.

◆ operator>=()

bool gsl::complex::operator>= ( complex const &  z) const
inline

A complex object must be less than comparable so that it can be used as a container value type.

This is the (lexicographic) greater than or equal to operator.

Parameters
zAnother complex
Returns
true or false according as this is greater than or equal to z

Definition at line 606 of file complex.hpp.

◆ polar()

static complex gsl::complex::polar ( double  r,
double  theta 
)
inlinestatic

C++ version of gsl_complex_rect().

Parameters
rThe magnitude
thetaThe argument
Returns
complex

Definition at line 125 of file complex.hpp.

References gsl::cpx::cos(), and gsl::cpx::sin().

Referenced by gsl::cpx::polar().

◆ pow()

static complex gsl::complex::pow ( complex const &  a,
complex const &  b 
)
inlinestatic

C++ version of gsl_complex_pow().

Parameters
aA complex number
bAnother complex number
Returns
\(a^b\)

Definition at line 314 of file complex.hpp.

References gsl::sf::mathieu::a(), gsl::sf::mathieu::b(), and complex().

Referenced by gsl::cpx::pow().

◆ pow_real()

static complex gsl::complex::pow_real ( complex const &  a,
double  b 
)
inlinestatic

C++ version of gsl_complex_pow_real().

Parameters
aA complex number
bA double
Returns
\(a^b\)

Definition at line 322 of file complex.hpp.

References gsl::sf::mathieu::a(), gsl::sf::mathieu::b(), and complex().

Referenced by gsl::cpx::pow_real().

◆ real()

double gsl::complex::real ( ) const
inline

C++ version of GSL_REAL().

Returns
The real part of this

Definition at line 137 of file complex.hpp.

Referenced by complex().

◆ rect()

static complex gsl::complex::rect ( double  x,
double  y 
)
inlinestatic

C++ version of gsl_complex_rect().

Parameters
xReal part
yImaginary part
Returns
complex

Definition at line 118 of file complex.hpp.

Referenced by gsl::cpx::rect().

◆ sec()

static complex gsl::complex::sec ( complex const &  a)
inlinestatic

C++ version of gsl_complex_sec().

Parameters
aA complex number
Returns
The secant

Definition at line 372 of file complex.hpp.

References gsl::sf::mathieu::a(), and complex().

Referenced by gsl::cpx::sec().

◆ sech()

static complex gsl::complex::sech ( complex const &  a)
inlinestatic

C++ version of gsl_complex_sech().

Parameters
aA complex number
Returns
The hyperbolic secant

Definition at line 484 of file complex.hpp.

References gsl::sf::mathieu::a(), and complex().

Referenced by gsl::cpx::sech().

◆ set_complex()

void gsl::complex::set_complex ( double  x,
double  y 
)
inline

C++ version of GSL_SET_COMPLEX().

Parameters
xReal part
yImaginary part

Definition at line 132 of file complex.hpp.

◆ set_imag()

void gsl::complex::set_imag ( double  y)
inline

C++ version of GSL_SET_IMAG().

Parameters
yThe new imaginary part

Definition at line 152 of file complex.hpp.

◆ set_real()

void gsl::complex::set_real ( double  x)
inline

C++ version of GSL_SET_REAL().

Parameters
xThe new real part

Definition at line 147 of file complex.hpp.

◆ sin()

static complex gsl::complex::sin ( complex const &  a)
inlinestatic

C++ version of gsl_complex_sin().

Parameters
aA complex number
Returns
The sine

Definition at line 358 of file complex.hpp.

References gsl::sf::mathieu::a(), and complex().

Referenced by gsl::cpx::sin().

◆ sinh()

static complex gsl::complex::sinh ( complex const &  a)
inlinestatic

C++ version of gsl_complex_sinh().

Parameters
aA complex number
Returns
The hyperbolic sine

Definition at line 470 of file complex.hpp.

References gsl::sf::mathieu::a(), and complex().

Referenced by gsl::cpx::sinh().

◆ sqrt()

static complex gsl::complex::sqrt ( complex const &  z)
inlinestatic

C++ version of gsl_complex_sqrt().

Parameters
zA complex number
Returns
The square root

Definition at line 299 of file complex.hpp.

References complex().

Referenced by gsl::cpx::sqrt().

◆ sqrt_real()

static complex gsl::complex::sqrt_real ( double  x)
inlinestatic

C++ version of gsl_complex_sqrt_real().

Parameters
xA double
Returns
The complex square root

Definition at line 306 of file complex.hpp.

References complex().

Referenced by gsl::cpx::sqrt_real().

◆ sub()

static complex gsl::complex::sub ( complex const &  a,
complex const &  b 
)
inlinestatic

C++ version of gsl_complex_sub().

Parameters
aA complex number
bA complex to subtract from a
Returns
The difference

Definition at line 191 of file complex.hpp.

References gsl::sf::mathieu::a(), gsl::sf::mathieu::b(), and complex().

Referenced by gsl::cpx::sub().

◆ sub_imag()

static complex gsl::complex::sub_imag ( complex const &  a,
double  y 
)
inlinestatic

C++ version of gsl_complex_sub_imag().

Parameters
aA complex number
yThe imaginary part of a double to subtract from a
Returns
The difference

Definition at line 255 of file complex.hpp.

References gsl::sf::mathieu::a(), and complex().

Referenced by gsl::cpx::sub_imag().

◆ sub_real()

static complex gsl::complex::sub_real ( complex const &  a,
double  x 
)
inlinestatic

C++ version of gsl_complex_sub_real().

Parameters
aA complex number
xA double to add to a
Returns
The sum

Definition at line 223 of file complex.hpp.

References gsl::sf::mathieu::a(), and complex().

Referenced by gsl::cpx::sub_real().

◆ tan()

static complex gsl::complex::tan ( complex const &  a)
inlinestatic

C++ version of gsl_complex_tan().

Parameters
aA complex number
Returns
The tangent

Definition at line 386 of file complex.hpp.

References gsl::sf::mathieu::a(), and complex().

Referenced by gsl::cpx::tan().

◆ tanh()

static complex gsl::complex::tanh ( complex const &  a)
inlinestatic

C++ version of gsl_complex_tanh().

Parameters
aA complex number
Returns
The hyperbolic tangent

Definition at line 498 of file complex.hpp.

References gsl::sf::mathieu::a(), and complex().

Referenced by gsl::cpx::tanh().

Friends And Related Function Documentation

◆ complex_ptr

friend class complex_ptr
friend

Definition at line 43 of file complex.hpp.

◆ complex_ref

friend class complex_ref
friend

Definition at line 44 of file complex.hpp.

◆ matrix_complex

friend class matrix_complex
friend

Definition at line 46 of file complex.hpp.

◆ vector_complex

friend class vector_complex
friend

Definition at line 45 of file complex.hpp.


The documentation for this class was generated from the following file: