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

This class can be used like a reference for complex_long_double objects so that we can iterate over a vector (for example) of them. More...

#include <complex_long_double.hpp>

Inheritance diagram for gsl::complex_long_double_ref:
Inheritance graph
Collaboration diagram for gsl::complex_long_double_ref:
Collaboration graph

Public Member Functions

 complex_long_double_ref (long double *dat)
 We use this in constructing complex_long_double_ptr objects. More...
 
 operator gsl_complex_long_double () const
 Make sure this is convertible to gsl_complex_long_double. More...
 
 operator complex_long_double () const
 Make sure this is convertible to complex_long_double. More...
 
 complex_long_double_ref ()
 The default constructor is only really useful for assigning to. More...
 
 complex_long_double_ref (complex_long_double &z)
 Make sure we can construct from a complex_long_double. More...
 
complex_long_double_refoperator= (complex_long_double const &z)
 Assignment from complex_long_double. More...
 
void set_complex_long_double (long double x, long double y)
 C++ version of GSL_SET_COMPLEX(). More...
 
long double real () const
 C++ version of GSL_REAL(). More...
 
long double imag () const
 C++ version of GSL_IMAG(). More...
 
void set_real (long double x)
 C++ version of GSL_SET_REAL(). More...
 
void set_imag (long double y)
 C++ version of GSL_SET_IMAG(). More...
 

Protected Attributes

long double * dat
 The data. More...
 

Detailed Description

This class can be used like a reference for complex_long_double objects so that we can iterate over a vector (for example) of them.

Definition at line 203 of file complex_long_double.hpp.

Constructor & Destructor Documentation

◆ complex_long_double_ref() [1/3]

gsl::complex_long_double_ref::complex_long_double_ref ( long double *  dat)
inline

We use this in constructing complex_long_double_ptr objects.

Parameters
datA pointer to the data

Definition at line 214 of file complex_long_double.hpp.

◆ complex_long_double_ref() [2/3]

gsl::complex_long_double_ref::complex_long_double_ref ( )
inline

The default constructor is only really useful for assigning to.

Definition at line 233 of file complex_long_double.hpp.

◆ complex_long_double_ref() [3/3]

gsl::complex_long_double_ref::complex_long_double_ref ( complex_long_double z)
inline

Make sure we can construct from a complex_long_double.

Parameters
zThe complex_long_double to construct from

Definition at line 238 of file complex_long_double.hpp.

Member Function Documentation

◆ imag()

long double gsl::complex_long_double_ref::imag ( ) const
inline

C++ version of GSL_IMAG().

Returns
The real part of this

Definition at line 264 of file complex_long_double.hpp.

◆ operator complex_long_double()

gsl::complex_long_double_ref::operator complex_long_double ( ) const
inline

Make sure this is convertible to complex_long_double.

This is not ideal because it copies twice. But it gets round the problem that a gsl_complex_long_double must contain constant data.

Returns
A complex_long_double

Definition at line 227 of file complex_long_double.hpp.

References dat.

◆ operator gsl_complex_long_double()

gsl::complex_long_double_ref::operator gsl_complex_long_double ( ) const
inline

Make sure this is convertible to gsl_complex_long_double.

This is not ideal because it copies twice. But it gets round the problem that a gsl_complex_long_double must contain constant data.

Returns
A gsl_complex_long_double

Definition at line 220 of file complex_long_double.hpp.

References dat.

◆ operator=()

complex_long_double_ref & gsl::complex_long_double_ref::operator= ( complex_long_double const &  z)
inline

Assignment from complex_long_double.

Parameters
zThe complex_long_double to assign from

Definition at line 246 of file complex_long_double.hpp.

References dat.

◆ real()

long double gsl::complex_long_double_ref::real ( ) const
inline

C++ version of GSL_REAL().

Returns
The real part of this

Definition at line 259 of file complex_long_double.hpp.

◆ set_complex_long_double()

void gsl::complex_long_double_ref::set_complex_long_double ( long double  x,
long double  y 
)
inline

C++ version of GSL_SET_COMPLEX().

Parameters
xReal part
yImaginary part

Definition at line 254 of file complex_long_double.hpp.

◆ set_imag()

void gsl::complex_long_double_ref::set_imag ( long double  y)
inline

C++ version of GSL_SET_IMAG().

Parameters
yThe new imaginary part

Definition at line 274 of file complex_long_double.hpp.

◆ set_real()

void gsl::complex_long_double_ref::set_real ( long double  x)
inline

C++ version of GSL_SET_REAL().

Parameters
xThe new real part

Definition at line 269 of file complex_long_double.hpp.

Member Data Documentation

◆ dat

long double* gsl::complex_long_double_ref::dat
protected

The data.

Never initialised or destroyed within the class. Always precisely two elements.

Definition at line 208 of file complex_long_double.hpp.

Referenced by operator complex_long_double(), operator gsl_complex_long_double(), and operator=().


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