ccgsl 2.7.2
C++wrappersforGnuScientificLibrary
gsl::cheb::series Class Reference

Workspace for Chebyshev series. More...

#include <chebyshev.hpp>

Collaboration diagram for gsl::cheb::series:
Collaboration graph

Public Member Functions

 series ()
 The default constructor is only really useful for assigning to. More...
 
 series (size_t const order)
 The default constructor creates a new series with n elements. More...
 
 series (gsl_cheb_series *v)
 Could construct from a gsl_cheb_series. More...
 
 series (series const &v)
 The copy constructor. More...
 
seriesoperator= (series const &v)
 The assignment operator. More...
 
 ~series ()
 The destructor only deletes the pointers if count reaches zero. More...
 
 series (series &&v)
 Move constructor. More...
 
seriesoperator= (series &&v)
 Move operator. More...
 
bool operator== (series const &v) const
 Two series are identically equal if their elements are identical. More...
 
bool operator!= (series const &v) const
 Two series are different if their elements are not identical. More...
 
bool operator< (series const &v) const
 A container needs to define an ordering for sorting. More...
 
bool operator> (series const &v) const
 A container needs to define an ordering for sorting. More...
 
bool operator<= (series const &v) const
 A container needs to define an ordering for sorting. More...
 
bool operator>= (series const &v) const
 A container needs to define an ordering for sorting. More...
 
bool empty () const
 Find if the series is empty. More...
 
void swap (series &v)
 Swap two series objects. More...
 
gsl_cheb_series * get () const
 Get the gsl_cheb_series. More...
 
bool unique () const
 Find if this is the only object sharing the gsl_cheb_series. More...
 
size_t use_count () const
 Find how many series objects share this pointer. More...
 
 operator bool () const
 Allow conversion to bool. More...
 
int init (function_scl const &func, double const a, double const b)
 C++ version of gsl_cheb_init(). More...
 
int init (gsl_function const *func, double const a, double const b)
 C++ version of gsl_cheb_init(). More...
 

Private Attributes

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

Detailed Description

Workspace for Chebyshev series.

Definition at line 36 of file chebyshev.hpp.

Constructor & Destructor Documentation

◆ series() [1/5]

gsl::cheb::series::series ( )
inline

The default constructor is only really useful for assigning to.

Definition at line 41 of file chebyshev.hpp.

References ccgsl_pointer, and count.

Referenced by operator=().

◆ series() [2/5]

gsl::cheb::series::series ( size_t const  order)
inlineexplicit

The default constructor creates a new series with n elements.

Parameters
orderThe order of the series

Definition at line 51 of file chebyshev.hpp.

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

◆ series() [3/5]

gsl::cheb::series::series ( gsl_cheb_series *  v)
inlineexplicit

Could construct from a gsl_cheb_series.

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

Parameters
vThe series

Definition at line 67 of file chebyshev.hpp.

References ccgsl_pointer, and count.

◆ series() [4/5]

gsl::cheb::series::series ( series const &  v)
inline

The copy constructor.

This creates a new reference to the workspace.

Parameters
vThe series to copy.

Definition at line 78 of file chebyshev.hpp.

References ccgsl_pointer, and count.

◆ ~series()

gsl::cheb::series::~series ( )
inline

The destructor only deletes the pointers if count reaches zero.

Definition at line 97 of file chebyshev.hpp.

References ccgsl_pointer, and count.

◆ series() [5/5]

gsl::cheb::series::series ( series &&  v)
inline

Move constructor.

Parameters
vThe series to move.

Definition at line 109 of file chebyshev.hpp.

References count.

Member Function Documentation

◆ empty()

bool gsl::cheb::series::empty ( ) const
inline

Find if the series is empty.

Returns
true if has size zero; otherwise false

Definition at line 186 of file chebyshev.hpp.

References ccgsl_pointer.

◆ get()

gsl_cheb_series * gsl::cheb::series::get ( ) const
inline

◆ init() [1/2]

int gsl::cheb::series::init ( function_scl const &  func,
double const  a,
double const  b 
)
inline

C++ version of gsl_cheb_init().

Parameters
funcA gsl::function_scl
aThe lower interval point
bThe upper interval point
Returns
Error code on failure

Definition at line 241 of file chebyshev.hpp.

References gsl::sf::mathieu::a(), gsl::sf::mathieu::b(), gsl::sf::hermite::func(), and get().

◆ init() [2/2]

int gsl::cheb::series::init ( gsl_function const *  func,
double const  a,
double const  b 
)
inline

C++ version of gsl_cheb_init().

Parameters
funcA gsl_function or gsl::function_scl pointer
aThe lower interval point
bThe upper interval point
Returns
Error code on failure

Definition at line 250 of file chebyshev.hpp.

References gsl::sf::mathieu::a(), gsl::sf::mathieu::b(), gsl::sf::hermite::func(), and get().

◆ operator bool()

gsl::cheb::series::operator bool ( ) const
inlineexplicit

Allow conversion to bool.

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

Definition at line 232 of file chebyshev.hpp.

References ccgsl_pointer.

◆ operator!=()

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

Two series are different if their elements are not identical.

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

Definition at line 139 of file chebyshev.hpp.

References operator==().

◆ operator<()

bool gsl::cheb::series::operator< ( series 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 series is nonnegative.

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

Definition at line 151 of file chebyshev.hpp.

References ccgsl_pointer.

◆ operator<=()

bool gsl::cheb::series::operator<= ( series 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 series is nonnegative.

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

Definition at line 171 of file chebyshev.hpp.

References ccgsl_pointer.

◆ operator=() [1/2]

series & gsl::cheb::series::operator= ( series &&  v)
inline

Move operator.

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

Definition at line 118 of file chebyshev.hpp.

References series().

◆ operator=() [2/2]

series & gsl::cheb::series::operator= ( series const &  v)
inline

The assignment operator.

This copies elementwise.

Parameters
vThe series to copy

Definition at line 85 of file chebyshev.hpp.

References ccgsl_pointer, and count.

◆ operator==()

bool gsl::cheb::series::operator== ( series const &  v) const
inline

Two series are identically equal if their elements are identical.

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

Definition at line 131 of file chebyshev.hpp.

References ccgsl_pointer.

Referenced by operator!=().

◆ operator>()

bool gsl::cheb::series::operator> ( series 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 series is nonnegative.

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

Definition at line 161 of file chebyshev.hpp.

References ccgsl_pointer.

◆ operator>=()

bool gsl::cheb::series::operator>= ( series 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 series is nonnegative.

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

Definition at line 181 of file chebyshev.hpp.

References ccgsl_pointer.

◆ swap()

void gsl::cheb::series::swap ( series v)
inline

Swap two series objects.

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

Parameters
vThe series to swap with this.

Definition at line 193 of file chebyshev.hpp.

References ccgsl_pointer, and count.

◆ unique()

bool gsl::cheb::series::unique ( ) const
inline

Find if this is the only object sharing the gsl_cheb_series.

Returns
true or falses according as this is the only series object sharing the gsl_cheb_series.

Definition at line 218 of file chebyshev.hpp.

References count.

◆ use_count()

size_t gsl::cheb::series::use_count ( ) const
inline

Find how many series objects share this pointer.

Returns
the number of series objects that share this pointer.

Definition at line 223 of file chebyshev.hpp.

References count.

Member Data Documentation

◆ ccgsl_pointer

gsl_cheb_series* gsl::cheb::series::ccgsl_pointer
private

The shared pointer.

Definition at line 201 of file chebyshev.hpp.

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

◆ count

size_t* gsl::cheb::series::count
private

The shared reference count.

Definition at line 205 of file chebyshev.hpp.

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


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