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

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

#include <complex.hpp>

Inheritance diagram for gsl::complex_ptr:
Inheritance graph
Collaboration diagram for gsl::complex_ptr:
Collaboration graph

Public Member Functions

 complex_ptr (double *dat)
 Typically we are given a pointer to the data storing the complex and need to construct a complex_ptr from it. More...
 
complex_ref operator* ()
 Dereference the pointer. More...
 
complex_refoperator-> ()
 Dereference the pointer. More...
 
complex_ref const operator* () const
 Dereference the pointer. More...
 
complex_ref const * operator-> () const
 Dereference the pointer. More...
 

Additional Inherited Members

- Private Member Functions inherited from gsl::complex_ref
 complex_ref (double *dat)
 We use this in constructing complex_ptr objects. More...
 
 operator gsl_complex () const
 Make sure this is convertible to gsl_complex. More...
 
 operator complex () const
 Make sure this is convertible to complex. More...
 
 complex_ref ()
 The default constructor is only really useful for assigning to. More...
 
 complex_ref (complex &z)
 Make sure we can construct from a complex. More...
 
complex_refoperator= (complex const &z)
 Assignment from complex. 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...
 
- Private Attributes inherited from gsl::complex_ref
double * dat
 The data. More...
 

Detailed Description

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

Definition at line 691 of file complex.hpp.

Constructor & Destructor Documentation

◆ complex_ptr()

gsl::complex_ptr::complex_ptr ( double *  dat)
inline

Typically we are given a pointer to the data storing the complex and need to construct a complex_ptr from it.

Parameters
datA pointer to the data

Definition at line 698 of file complex.hpp.

Member Function Documentation

◆ operator*() [1/2]

complex_ref gsl::complex_ptr::operator* ( )
inline

Dereference the pointer.

Returns
the complex object

Definition at line 703 of file complex.hpp.

◆ operator*() [2/2]

complex_ref const gsl::complex_ptr::operator* ( ) const
inline

Dereference the pointer.

Returns
the complex object

Definition at line 713 of file complex.hpp.

◆ operator->() [1/2]

complex_ref * gsl::complex_ptr::operator-> ( )
inline

Dereference the pointer.

Returns
a pointer to the complex object

Definition at line 708 of file complex.hpp.

◆ operator->() [2/2]

complex_ref const * gsl::complex_ptr::operator-> ( ) const
inline

Dereference the pointer.

Returns
a pointer to the complex object

Definition at line 718 of file complex.hpp.


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