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

Discrete Hankel Transforms. More...

#include <dht.hpp>

Collaboration diagram for gsl::dht:
Collaboration graph

Public Member Functions

 dht ()
 The default constructor is only really useful for assigning to. More...
 
 dht (size_t const size)
 The default constructor creates a new dht with n elements. More...
 
 dht (size_t size, double nu, double xmax)
 C++ version of gsl_dht_new(). More...
 
 dht (gsl_dht *v)
 Could construct from a gsl_dht. More...
 
 dht (dht const &v)
 The copy constructor. More...
 
dhtoperator= (dht const &v)
 The assignment operator. More...
 
 ~dht ()
 The destructor only deletes the pointers if count reaches zero. More...
 
 dht (dht &&v)
 Move constructor. More...
 
dhtoperator= (dht &&v)
 Move operator. More...
 
bool operator== (dht const &v) const
 Two dht are identically equal if their elements are identical. More...
 
bool operator!= (dht const &v) const
 Two dht are different if their elements are not identical. More...
 
bool operator< (dht const &v) const
 A container needs to define an ordering for sorting. More...
 
bool operator> (dht const &v) const
 A container needs to define an ordering for sorting. More...
 
bool operator<= (dht const &v) const
 A container needs to define an ordering for sorting. More...
 
bool operator>= (dht const &v) const
 A container needs to define an ordering for sorting. More...
 
bool empty () const
 Find if the dht is empty. More...
 
void swap (dht &v)
 Swap two dht objects. More...
 
gsl_dht * get () const
 Get the gsl_dht. More...
 
bool unique () const
 Find if this is the only object sharing the gsl_dht. More...
 
size_t use_count () const
 Find how many dht objects share this pointer. More...
 
 operator bool () const
 Allow conversion to bool. More...
 
int init (double nu, double xmax)
 C++ version of gsl_dht_init(). More...
 
double x_sample (int n) const
 C++ version of gsl_dht_x_sample(). More...
 
double k_sample (int n) const
 C++ version of gsl_dht_k_sample(). More...
 
int apply (double *f_in, double *f_out) const
 C++ version of gsl_dht_apply(). More...
 
template<typename ARRAY >
int apply (ARRAY &f_in, ARRAY &f_out) const
 C++ version of gsl_dht_apply(). More...
 

Private Attributes

gsl_dht * ccgsl_pointer
 The shared pointer. More...
 
size_t * count
 The shared reference count. More...
 

Detailed Description

Discrete Hankel Transforms.

Definition at line 31 of file dht.hpp.

Constructor & Destructor Documentation

◆ dht() [1/6]

gsl::dht::dht ( )
inline

The default constructor is only really useful for assigning to.

Definition at line 36 of file dht.hpp.

References ccgsl_pointer, and count.

Referenced by operator=().

◆ dht() [2/6]

gsl::dht::dht ( size_t const  size)
inlineexplicit

The default constructor creates a new dht with n elements.

Parameters
sizeThe number of elements in the dht

Definition at line 46 of file dht.hpp.

References ccgsl_pointer, count, and gsl::cheb::size().

◆ dht() [3/6]

gsl::dht::dht ( size_t  size,
double  nu,
double  xmax 
)
inline

C++ version of gsl_dht_new().

Parameters
sizeThe size
nuparameter (undocumented)
xmaxparameter (undocumented)

Definition at line 62 of file dht.hpp.

References ccgsl_pointer, count, and gsl::cheb::size().

◆ dht() [4/6]

gsl::dht::dht ( gsl_dht *  v)
inlineexplicit

Could construct from a gsl_dht.

This is not usually a good idea. In this case we should not use gsl_dht_free() to deallocate the memory.

Parameters
vThe dht

Definition at line 79 of file dht.hpp.

References ccgsl_pointer, and count.

◆ dht() [5/6]

gsl::dht::dht ( dht const &  v)
inline

The copy constructor.

This creates a new reference to the workspace.

Parameters
vThe dht to copy.

Definition at line 90 of file dht.hpp.

References ccgsl_pointer, and count.

◆ ~dht()

gsl::dht::~dht ( )
inline

The destructor only deletes the pointers if count reaches zero.

Definition at line 109 of file dht.hpp.

References ccgsl_pointer, and count.

◆ dht() [6/6]

gsl::dht::dht ( dht &&  v)
inline

Move constructor.

Parameters
vThe dht to move.

Definition at line 121 of file dht.hpp.

References count.

Member Function Documentation

◆ apply() [1/2]

template<typename ARRAY >
int gsl::dht::apply ( ARRAY &  f_in,
ARRAY &  f_out 
) const
inline

C++ version of gsl_dht_apply().

This version handles std::vector and gsl::vector.

Parameters
f_inAn array with size the same as the size of the transform (this)
f_outAn array with size the same as the size of the transform (this) [return value]
Returns
Error code on failure

Definition at line 287 of file dht.hpp.

References get(), and gsl::rstat::n().

◆ apply() [2/2]

int gsl::dht::apply ( double *  f_in,
double *  f_out 
) const
inline

C++ version of gsl_dht_apply().

Parameters
f_inAn array with size the same as the size of the transform (this)
f_outAn array with size the same as the size of the transform (this) [return value]
Returns
Error code on failure

Definition at line 275 of file dht.hpp.

References get().

◆ empty()

bool gsl::dht::empty ( ) const
inline

Find if the dht is empty.

Returns
true if has size zero; otherwise false

Definition at line 198 of file dht.hpp.

References ccgsl_pointer.

◆ get()

gsl_dht * gsl::dht::get ( ) const
inline

Get the gsl_dht.

Returns
the gsl_dht

Definition at line 224 of file dht.hpp.

References ccgsl_pointer.

Referenced by apply(), init(), k_sample(), and x_sample().

◆ init()

int gsl::dht::init ( double  nu,
double  xmax 
)
inline

C++ version of gsl_dht_init().

Parameters
nuparameter (undocumented)
xmaxparameter (undocumented)
Returns
Error code on failure

Definition at line 252 of file dht.hpp.

References get().

◆ k_sample()

double gsl::dht::k_sample ( int  n) const
inline

C++ version of gsl_dht_k_sample().

Parameters
nAn integer (undocumented)
Returns
The nth sample point in k-space

Definition at line 266 of file dht.hpp.

References get(), and gsl::rstat::n().

◆ operator bool()

gsl::dht::operator bool ( ) const
inlineexplicit

Allow conversion to bool.

Returns
true or false according as this contains a pointer to a gsl_dht.

Definition at line 244 of file dht.hpp.

References ccgsl_pointer.

◆ operator!=()

bool gsl::dht::operator!= ( dht const &  v) const
inline

Two dht are different if their elements are not identical.

Parameters
vThe dht to be compared with this
Returns
false or true according as this and v have identical elements or not

Definition at line 151 of file dht.hpp.

References operator==().

◆ operator<()

bool gsl::dht::operator< ( dht const &  v) const
inline

A container needs to define an ordering for sorting.

This uses standard lexicographical ordering and so is not useful, for example, for checking, that a dht is nonnegative.

Parameters
vThe dht to be compared with this
Returns
false or true according as this is less than v lexicographically

Definition at line 163 of file dht.hpp.

References ccgsl_pointer.

◆ operator<=()

bool gsl::dht::operator<= ( dht const &  v) const
inline

A container needs to define an ordering for sorting.

This uses standard lexicographical ordering and so is not useful, for example, for checking, that a dht is nonnegative.

Parameters
vThe dht to be compared with this
Returns
false or true according as this is less than or equal to v lexicographically

Definition at line 183 of file dht.hpp.

References ccgsl_pointer.

◆ operator=() [1/2]

dht & gsl::dht::operator= ( dht &&  v)
inline

Move operator.

Parameters
vThe dht to move.
Returns
A reference to this.

Definition at line 130 of file dht.hpp.

References dht().

◆ operator=() [2/2]

dht & gsl::dht::operator= ( dht const &  v)
inline

The assignment operator.

This copies elementwise.

Parameters
vThe dht to copy

Definition at line 97 of file dht.hpp.

References ccgsl_pointer, and count.

◆ operator==()

bool gsl::dht::operator== ( dht const &  v) const
inline

Two dht are identically equal if their elements are identical.

Parameters
vThe dht to be compared with this
Returns
true or false according as this and v have identical elements or not

Definition at line 143 of file dht.hpp.

References ccgsl_pointer.

Referenced by operator!=().

◆ operator>()

bool gsl::dht::operator> ( dht const &  v) const
inline

A container needs to define an ordering for sorting.

This uses standard lexicographical ordering and so is not useful, for example, for checking, that a dht is nonnegative.

Parameters
vThe dht to be compared with this
Returns
false or true according as this is greater than v lexicographically

Definition at line 173 of file dht.hpp.

References ccgsl_pointer.

◆ operator>=()

bool gsl::dht::operator>= ( dht const &  v) const
inline

A container needs to define an ordering for sorting.

This uses standard lexicographical ordering and so is not useful, for example, for checking, that a dht is nonnegative.

Parameters
vThe dht to be compared with this
Returns
false or true according as this is no less than v lexicographically

Definition at line 193 of file dht.hpp.

References ccgsl_pointer.

◆ swap()

void gsl::dht::swap ( dht v)
inline

Swap two dht objects.

This works even if the dht have different sizes because it swaps pointers.

Parameters
vThe dht to swap with this.

Definition at line 205 of file dht.hpp.

References ccgsl_pointer, and count.

◆ unique()

bool gsl::dht::unique ( ) const
inline

Find if this is the only object sharing the gsl_dht.

Returns
true or falses according as this is the only dht object sharing the gsl_dht.

Definition at line 230 of file dht.hpp.

References count.

◆ use_count()

size_t gsl::dht::use_count ( ) const
inline

Find how many dht objects share this pointer.

Returns
the number of dht objects that share this pointer.

Definition at line 235 of file dht.hpp.

References count.

◆ x_sample()

double gsl::dht::x_sample ( int  n) const
inline

C++ version of gsl_dht_x_sample().

Parameters
nAn integer (undocumented)
Returns
The nth sample point in the unit interval

Definition at line 259 of file dht.hpp.

References get(), and gsl::rstat::n().

Member Data Documentation

◆ ccgsl_pointer

gsl_dht* gsl::dht::ccgsl_pointer
private

The shared pointer.

Definition at line 213 of file dht.hpp.

Referenced by dht(), empty(), get(), operator bool(), operator<(), operator<=(), operator=(), operator==(), operator>(), operator>=(), swap(), and ~dht().

◆ count

size_t* gsl::dht::count
private

The shared reference count.

Definition at line 217 of file dht.hpp.

Referenced by dht(), operator=(), swap(), unique(), use_count(), and ~dht().


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