gslcpp
Modern-C++ Wrapper for GSL
Public Types | Public Member Functions | List of all members
gsl::complex< double > Struct Reference

Specialization of gsl::complex for double. More...

#include <complex.hpp>

Inheritance diagram for gsl::complex< double >:
[legend]
Collaboration diagram for gsl::complex< double >:
[legend]

Public Types

using P = std::complex< double >
 Type of parent.
 

Public Member Functions

 complex (gsl_complex const &z)
 Construct from gsl_complex. More...
 
 complex (P const &z)
 Construct from instance of parent's type. More...
 
 operator gsl_complex & ()
 Convert to gsl_complex. More...
 
 operator gsl_complex const & () const
 Convert to gsl_complex. More...
 

Detailed Description

Specialization of gsl::complex for double.

Definition at line 22 of file complex.hpp.

Constructor & Destructor Documentation

◆ complex() [1/2]

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

Construct from gsl_complex.

Parameters
zReference to instance of gsl_complex.

Definition at line 28 of file complex.hpp.

28 : P(GSL_REAL(z), GSL_IMAG(z)) {}

◆ complex() [2/2]

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

Construct from instance of parent's type.

Parameters
zReference to instance of parent's type.

Definition at line 32 of file complex.hpp.

32 : P(z) {}

Member Function Documentation

◆ operator gsl_complex &()

gsl::complex< double >::operator gsl_complex & ( )
inline

Convert to gsl_complex.

Returns
Reference to this as gsl_complex.

Definition at line 36 of file complex.hpp.

36 { return *(gsl_complex *)this; }

◆ operator gsl_complex const &()

gsl::complex< double >::operator gsl_complex const & ( ) const
inline

Convert to gsl_complex.

Returns
Reference to this as gsl_complex.

Definition at line 40 of file complex.hpp.

40 { return *(gsl_complex const *)this; }

The documentation for this struct was generated from the following file:
gsl::complex< double >::P
std::complex< double > P
Type of parent.
Definition: complex.hpp:23