20#ifndef CCGSL_SF_MATHIEU_HPP
21#define CCGSL_SF_MATHIEU_HPP
23#include<gsl/gsl_sf_mathieu.h>
55 explicit workspace(
size_t const nn,
double const qq ){
58 try {
count =
new size_t; }
catch( std::bad_alloc& e ){
107#ifdef __GXX_EXPERIMENTAL_CXX0X__
113 std::swap(
count, v.count );
114 v.ccgsl_pointer =
nullptr;
122 workspace( std::move( v ) ).swap( *
this );
237#ifdef __GXX_EXPERIMENTAL_CXX0X__
251 inline int a_array(
int order_min,
int order_max,
double qq,
252 workspace& work,
double result_array[] ){
253 return gsl_sf_mathieu_a_array( order_min, order_max, qq, work.
get(), result_array ); }
263 inline int b_array(
int order_min,
int order_max,
double qq,
264 workspace& work,
double result_array[] ){
265 return gsl_sf_mathieu_b_array( order_min, order_max, qq, work.
get(), result_array ); }
273 return gsl_sf_mathieu_a(
order, qq ); }
299 return gsl_sf_mathieu_b(
order, qq ); }
309 return gsl_sf_mathieu_a_coeff(
order, qq, aa, coeff ); }
319 return gsl_sf_mathieu_b_coeff(
order, qq, aa, coeff ); }
327 inline double ce(
int order,
double qq,
double zz ){
328 return gsl_sf_mathieu_ce(
order, qq, zz ); }
338 return gsl_sf_mathieu_ce_e(
order, qq, zz, &
result ); }
348 return gsl_sf_mathieu_se_e(
order, qq, zz, &
result ); }
356 inline double se(
int order,
double qq,
double zz ){
357 return gsl_sf_mathieu_se(
order, qq, zz ); }
368 inline int ce_array(
int nmin,
int nmax,
double qq,
double zz,
369 workspace& work,
double result_array[] ){
370 return gsl_sf_mathieu_ce_array( nmin, nmax, qq, zz, work.
get(), result_array ); }
381 inline int se_array(
int nmin,
int nmax,
double qq,
double zz,
382 workspace& work,
double result_array[] ){
383 return gsl_sf_mathieu_se_array( nmin, nmax, qq, zz, work.
get(), result_array ); }
392 inline double Mc(
int kind,
int order,
double qq,
double zz ){
393 return gsl_sf_mathieu_Mc( kind,
order, qq, zz ); }
404 return gsl_sf_mathieu_Mc_e( kind,
order, qq, zz, &
result ); }
413 inline double Ms(
int kind,
int order,
double qq,
double zz ){
414 return gsl_sf_mathieu_Ms( kind,
order, qq, zz ); }
425 return gsl_sf_mathieu_Ms_e( kind,
order, qq, zz, &
result ); }
437 inline int Mc_array(
int kind,
int nmin,
int nmax,
double qq,
double zz,
438 workspace& work,
double result_array[] ){
439 return gsl_sf_mathieu_Mc_array( kind, nmin, nmax, qq, zz, work.
get(), result_array ); }
451 inline int Ms_array(
int kind,
int nmin,
int nmax,
double qq,
double zz,
452 workspace& work,
double result_array[] ){
453 return gsl_sf_mathieu_Ms_array( kind, nmin, nmax, qq, zz, work.
get(), result_array ); }
Workspace for general matrices.
size_t size() const
The size of the workspace.
bool operator==(workspace const &v) const
Two workspace are identically equal if their elements are identical.
bool operator!=(workspace const &v) const
Two workspace are different equal if their elements are not identical.
bool operator>(workspace const &v) const
A container needs to define an ordering for sorting.
size_t * count
The shared reference count.
workspace & operator=(workspace const &v)
The assignment operator.
~workspace()
The destructor only deletes the pointers if count reaches zero.
workspace & operator=(workspace &&v)
Move operator.
gsl_sf_mathieu_workspace * get() const
Get the gsl_sf_mathieu_workspace.
workspace(workspace &&v)
Move constructor.
gsl_sf_mathieu_workspace * ccgsl_pointer
The shared pointer.
workspace(size_t const nn, double const qq)
The default constructor creates a new workspace with n elements.
bool operator>=(workspace const &v) const
A container needs to define an ordering for sorting.
workspace(workspace const &v)
The copy constructor.
workspace(gsl_sf_mathieu_workspace *v)
Could construct from a gsl_sf_mathieu_workspace.
bool empty() const
Find if the workspace is empty.
bool unique() const
Find if this is the only object sharing the gsl_sf_mathieu_workspace.
bool operator<=(workspace const &v) const
A container needs to define an ordering for sorting.
void swap(workspace &v)
Swap two workspace.
bool operator<(workspace const &v) const
A container needs to define an ordering for sorting.
size_t use_count() const
Find how many workspace objects share this pointer.
workspace()
The default constructor is only really useful for assigning to.
size_t order(workspace &w)
C++ version of gsl_bspline_order().
double Ms(int kind, int order, double qq, double zz)
C++ version of gsl_sf_mathieu_Ms().
double se(int order, double qq, double zz)
C++ version of gsl_sf_mathieu_se().
int b_e(int order, double qq, result &result)
C++ version of gsl_sf_mathieu_b_e().
int a_coeff(int order, double qq, double aa, double coeff[])
C++ version of gsl_sf_mathieu_a_coeff().
int ce_array(int nmin, int nmax, double qq, double zz, workspace &work, double result_array[])
C++ version of gsl_sf_mathieu_ce_array().
int a_array(int order_min, int order_max, double qq, workspace &work, double result_array[])
C++ version of gsl_sf_mathieu_a_array().
int Mc_e(int kind, int order, double qq, double zz, result &result)
C++ version of gsl_sf_mathieu_Mc_e().
double ce(int order, double qq, double zz)
C++ version of gsl_sf_mathieu_ce().
int b_array(int order_min, int order_max, double qq, workspace &work, double result_array[])
C++ version of gsl_sf_mathieu_b_array().
int a_e(int order, double qq, result &result)
C++ version of gsl_sf_mathieu_a_e().
int ce_e(int order, double qq, double zz, result &result)
C++ version of gsl_sf_mathieu_ce_e().
int Mc_array(int kind, int nmin, int nmax, double qq, double zz, workspace &work, double result_array[])
C++ version of gsl_sf_mathieu_Mc_array().
double b(int order, double qq)
C++ version of gsl_sf_mathieu_b().
int se_array(int nmin, int nmax, double qq, double zz, workspace &work, double result_array[])
C++ version of gsl_sf_mathieu_se_array().
int Ms_array(int kind, int nmin, int nmax, double qq, double zz, workspace &work, double result_array[])
C++ version of gsl_sf_mathieu_Ms_array().
int se_e(int order, double qq, double zz, result &result)
C++ version of gsl_sf_mathieu_se_e().
int b_coeff(int order, double qq, double aa, double coeff[])
C++ version of gsl_sf_mathieu_b_coeff().
double Mc(int kind, int order, double qq, double zz)
C++ version of gsl_sf_mathieu_Mc().
double a(int order, double qq)
C++ version of gsl_sf_mathieu_a().
int Ms_e(int kind, int order, double qq, double zz, result &result)
C++ version of gsl_sf_mathieu_Ms_e().
gsl_sf_result result
Typedef for gsl_sf_result.
The gsl package creates an interface to the GNU Scientific Library for C++.