24#include<gsl/gsl_sum.h>
56 try {
count =
new size_t; }
catch( std::bad_alloc& e ){
106#ifdef __GXX_EXPERIMENTAL_CXX0X__
112 std::swap(
count, v.count );
113 v.ccgsl_pointer =
nullptr;
121 workspace( std::move( v ) ).swap( *
this );
231#ifdef __GXX_EXPERIMENTAL_CXX0X__
268 return gsl_sum_levin_u_accel(
array,
array_size, w.get(), sum_accel, abserr );
280 template<typename ARRAY>
283 return gsl_sum_levin_u_accel(
array.data(),
array.size(), w.
get(), &sum_accel, &abserr );
289 namespace levin_utrunc {
311 try {
count =
new size_t; }
catch( std::bad_alloc& e ){
324 explicit workspace( gsl_sum_levin_utrunc_workspace* v ){
361#ifdef __GXX_EXPERIMENTAL_CXX0X__
367 std::swap(
count, v.count );
368 v.ccgsl_pointer =
nullptr;
376 workspace( std::move( v ) ).swap( *
this );
486#ifdef __GXX_EXPERIMENTAL_CXX0X__
522 double* abserr_trunc ){
523 return gsl_sum_levin_utrunc_accel(
array,
array_size, w.get(), sum_accel, abserr_trunc );
535 template<typename ARRAY>
537 return gsl_sum_levin_utrunc_accel(
array.data(),
array.size(), w.
get(), sum_accel, abserr_trunc );
Workspace for the Levin u transform.
size_t i() const
Give access to underlying struct value.
gsl_sum_levin_u_workspace * get() const
Get the gsl_sum_levin_u_workspace.
double sum_plain() const
Give access to underlying struct value.
bool operator>=(workspace const &v) const
A container needs to define an ordering for sorting.
workspace(gsl_sum_levin_u_workspace *v)
Could construct from a gsl_sum_levin_u_workspace.
workspace()
The default constructor is only really useful for assigning to.
size_t * count
The shared reference count.
bool empty() const
Find if the workspace is empty.
workspace(size_t const n)
The default constructor creates a new workspace with n elements.
void swap(workspace &v)
Swap two workspace objects.
size_t use_count() const
Find how many workspace objects share this pointer.
bool operator!=(workspace const &v) const
Two workspace are different if their elements are not identical.
workspace & operator=(workspace &&v)
Move operator.
gsl_sum_levin_u_workspace * ccgsl_pointer
The shared pointer.
size_t terms_used() const
Give access to underlying struct value.
~workspace()
The destructor only deletes the pointers if count reaches zero.
workspace(workspace &&v)
Move constructor.
workspace(workspace const &v)
The copy constructor.
bool operator<=(workspace const &v) const
A container needs to define an ordering for sorting.
bool operator<(workspace const &v) const
A container needs to define an ordering for sorting.
bool operator>(workspace const &v) const
A container needs to define an ordering for sorting.
size_t size() const
Give access to underlying struct value.
workspace & operator=(workspace const &v)
The assignment operator.
bool operator==(workspace const &v) const
Two workspace are identically equal if their elements are identical.
bool unique() const
Find if this is the only object sharing the gsl_sum_levin_u_workspace.
Workspace for the Levin u transform without error estimation.
workspace(size_t const n)
The default constructor creates a new workspace with n elements.
void swap(workspace &v)
Swap two workspace objects.
size_t size() const
Give access to underlying struct value.
double sum_plain() const
Give access to underlying struct value.
workspace()
The default constructor is only really useful for assigning to.
size_t use_count() const
Find how many workspace objects share this pointer.
workspace(workspace const &v)
The copy constructor.
workspace(workspace &&v)
Move constructor.
size_t * count
The shared reference count.
size_t terms_used() const
Give access to underlying struct value.
bool operator<(workspace const &v) const
A container needs to define an ordering for sorting.
gsl_sum_levin_utrunc_workspace * get() const
Get the gsl_sum_levin_utrunc_workspace.
bool operator!=(workspace const &v) const
Two workspace are different if their elements are not identical.
bool empty() const
Find if the workspace is empty.
gsl_sum_levin_utrunc_workspace * ccgsl_pointer
The shared pointer.
size_t i() const
Give access to underlying struct value.
bool unique() const
Find if this is the only object sharing the gsl_sum_levin_utrunc_workspace.
bool operator<=(workspace const &v) const
A container needs to define an ordering for sorting.
workspace & operator=(workspace &&v)
Move operator.
workspace & operator=(workspace const &v)
The assignment operator.
~workspace()
The destructor only deletes the pointers if count reaches zero.
bool operator>(workspace const &v) const
A container needs to define an ordering for sorting.
workspace(gsl_sum_levin_utrunc_workspace *v)
Could construct from a gsl_sum_levin_utrunc_workspace.
bool operator==(workspace const &v) const
Two workspace are identically equal if their elements are identical.
bool operator>=(workspace const &v) const
A container needs to define an ordering for sorting.
int sum(movstat::end_t const endtype, vector const &x, vector &y, workspace &w)
C++ version of gsl_movstat_sum().
size_t n(workspace const &w)
C++ version of gsl_rstat_n().
int array(int const nmax, double const x, DATA &result_array)
C++ version of gsl_sf_hermite_array().
int array_size(int const lmax, int const m)
C++ version of gsl_sf_legendre_array_size().
int accel(ARRAY const &array, workspace &w, double &sum_accel, double &abserr)
C++ version of gsl_sum_levin_u_accel().
int accel(ARRAY const &array, workspace &w, double *sum_accel, double *abserr_trunc)
C++ version of gsl_sum_levin_utrunc_accel().
The gsl package creates an interface to the GNU Scientific Library for C++.