20#ifndef CCGSL_INTEGRATION_HPP
21#define CCGSL_INTEGRATION_HPP
25#include<gsl/gsl_integration.h>
33 namespace integration {
55 try {
count =
new size_t; }
catch( std::bad_alloc& e ){
105#ifdef __GXX_EXPERIMENTAL_CXX0X__
111 std::swap(
count, v.count );
112 v.ccgsl_pointer =
nullptr;
120 workspace( std::move( v ) ).swap( *
this );
230#ifdef __GXX_EXPERIMENTAL_CXX0X__
261 const double a,
const double b,
const double alpha,
265 try {
count =
new size_t; }
catch( std::bad_alloc& e ){
315#ifdef __GXX_EXPERIMENTAL_CXX0X__
321 std::swap(
count, v.count );
322 v.ccgsl_pointer =
nullptr;
440#ifdef __GXX_EXPERIMENTAL_CXX0X__
473 try {
count =
new size_t; }
catch( std::bad_alloc& e ){
523#ifdef __GXX_EXPERIMENTAL_CXX0X__
529 std::swap(
count, v.count );
530 v.ccgsl_pointer =
nullptr;
648#ifdef __GXX_EXPERIMENTAL_CXX0X__
664 int const mu,
int const nu ){
665 return gsl_integration_qaws_table_set( t.
get(), alpha,
beta, mu, nu ); }
700 = gsl_integration_qawo_table_alloc( omega, L,
701 static_cast<gsl_integration_qawo_enum
>( sine ),
n );
703 try {
count =
new size_t; }
catch( std::bad_alloc& e ){
753#ifdef __GXX_EXPERIMENTAL_CXX0X__
759 std::swap(
count, v.count );
760 v.ccgsl_pointer =
nullptr;
878#ifdef __GXX_EXPERIMENTAL_CXX0X__
894 return gsl_integration_qawo_table_set( t.
get(), omega, L,
895 static_cast<gsl_integration_qawo_enum
>( sine ) ); }
904 return gsl_integration_qawo_table_set_length( t.
get(), L ); }
917 double& resabs,
double& resasc ){
918 gsl_integration_qk15( &f,
a,
b, &
result, &abserr, &resabs, &resasc ); }
931 inline void qk15( gsl_function
const* f,
double a,
double b,
double*
result,
double* abserr,
932 double* resabs,
double* resasc ){
933 gsl_integration_qk15( f,
a,
b,
result, abserr, resabs, resasc ); }
947 double& resabs,
double& resasc ){
948 gsl_integration_qk21( &f,
a,
b, &
result, &abserr, &resabs, &resasc ); }
961 inline void qk21( gsl_function
const* f,
double a,
double b,
double*
result,
double* abserr,
962 double* resabs,
double* resasc ){
963 gsl_integration_qk21( f,
a,
b,
result, abserr, resabs, resasc ); }
977 double& resabs,
double& resasc ){
978 gsl_integration_qk31( &f,
a,
b, &
result, &abserr, &resabs, &resasc ); }
991 inline void qk31( gsl_function
const* f,
double a,
double b,
double*
result,
double* abserr,
992 double* resabs,
double* resasc ){
993 gsl_integration_qk31( f,
a,
b,
result, abserr, resabs, resasc ); }
1007 double& resabs,
double& resasc ){
1008 gsl_integration_qk41( &f,
a,
b, &
result, &abserr, &resabs, &resasc ); }
1021 inline void qk41( gsl_function
const* f,
double a,
double b,
double*
result,
double* abserr,
1022 double* resabs,
double* resasc ){
1023 gsl_integration_qk41( f,
a,
b,
result, abserr, resabs, resasc ); }
1037 double& resabs,
double& resasc ){
1038 gsl_integration_qk51( &f,
a,
b, &
result, &abserr, &resabs, &resasc ); }
1051 inline void qk51( gsl_function
const* f,
double a,
double b,
double*
result,
double* abserr,
1052 double* resabs,
double* resasc ){
1053 gsl_integration_qk51( f,
a,
b,
result, abserr, resabs, resasc ); }
1067 double& resabs,
double& resasc ){
1068 gsl_integration_qk61( &f,
a,
b, &
result, &abserr, &resabs, &resasc ); }
1081 inline void qk61( gsl_function
const* f,
double a,
double b,
double*
result,
double* abserr,
1082 double* resabs,
double* resasc ){
1083 gsl_integration_qk61( f,
a,
b,
result, abserr, resabs, resasc ); }
1095 inline void qcheb( function_scl& f,
double a,
double b,
double* cheb12,
double* cheb24 ){
1096 gsl_integration_qcheb( &f,
a,
b, cheb12, cheb24 ); }
1106 inline void qcheb( gsl_function* f,
double a,
double b,
double* cheb12,
double* cheb24 ){
1107 gsl_integration_qcheb( f,
a,
b, cheb12, cheb24 ); }
1119 template<
typename T>
1121#ifndef GSL_RANGE_CHECK_OFF
1123 if( cheb12.size() < 13 ){
1124 gsl_error(
"expected cheb12 of length 13 (or more)",
1128 if( cheb24.size() < 25 ){
1129 gsl_error(
"expected cheb24 of length 25 (or more)",
1134 gsl_integration_qcheb( &f,
a,
b, cheb12.data(), cheb24.data() );
1147 template<
typename T>
1148 inline void qcheb( gsl_function* f,
double a,
double b, T& cheb12, T& cheb24 ){
1149#ifndef GSL_RANGE_CHECK_OFF
1151 if( cheb12.size() < 13 ){
1152 gsl_error(
"expected cheb12 of length 13 (or more)",
1156 if( cheb24.size() < 25 ){
1157 gsl_error(
"expected cheb24 of length 25 (or more)",
1162 gsl_integration_qcheb( f,
a,
b, cheb12.data(), cheb24.data() );
1183 inline void qk(
int const n,
double const xgk[],
double const wg[],
double const wgk[],
1184 double fv1[],
double fv2[],
function_scl const& f,
double a,
double b,
1185 double&
result,
double& abserr,
double& resabs,
double& resasc ){
1186 gsl_integration_qk(
n, xgk, wg, wgk, fv1, fv2, &f,
a,
b, &
result, &abserr, &resabs, &resasc );
1207 inline void qk(
int const n,
double const xgk[],
double const wg[],
double const wgk[],
1208 double fv1[],
double fv2[], gsl_function
const* f,
double a,
double b,
1209 double*
result,
double* abserr,
double* resabs,
double* resasc ){
1210 gsl_integration_qk(
n, xgk, wg, wgk, fv1, fv2, f,
a,
b,
result, abserr, resabs, resasc );
1230 template<
typename T>
1231 inline void qk( T
const& xgk, T
const& wg, T
const& wgk,
1233 double&
result,
double& abserr,
double& resabs,
double& resasc ){
1234#ifndef GSL_RANGE_CHECK_OFF
1235 size_t const n = xgk.size();
1237 if(
n == 0 ){ gsl_error(
"expected xgk of nonzero size",
1239 if( wg.size() !=
n ){ gsl_error(
"size mismatch: xgk and wg",
1241 if( wgk.size() !=
n ){ gsl_error(
"size mismatch: xgk and wgk",
1243 if( fv1.size() !=
n ){ gsl_error(
"size mismatch: xgk and fv1",
1245 if( fv2.size() !=
n ){ gsl_error(
"size mismatch: xgk and fv2",
1248 gsl_integration_qk(
n, xgk.data(), wg.data(), wgk.data(), fv1.data(), fv2.data(),
1249 &f,
a,
b, &
result, &abserr, &resabs, &resasc );
1269 template<
typename T>
1270 inline void qk( T
const& xgk, T
const& wg, T
const& wgk,
1271 T& fv1, T& fv2, gsl_function
const* f,
double a,
double b,
1272 double*
result,
double* abserr,
double* resabs,
double* resasc ){
1273#ifndef GSL_RANGE_CHECK_OFF
1274 size_t const n = xgk.size();
1276 if(
n == 0 ){ gsl_error(
"expected xgk of nonzero size",
1278 if( wg.size() !=
n ){ gsl_error(
"size mismatch: xgk and wg",
1280 if( wgk.size() !=
n ){ gsl_error(
"size mismatch: xgk and wgk",
1282 if( fv1.size() !=
n ){ gsl_error(
"size mismatch: xgk and fv1",
1284 if( fv2.size() !=
n ){ gsl_error(
"size mismatch: xgk and fv2",
1287 gsl_integration_qk(
n, xgk.data(), wg.data(), wgk.data(), fv1.data(), fv2.data(),
1288 f,
a,
b,
result, abserr, resabs, resasc );
1305 double&
result,
double& abserr,
size_t& neval ){
1306 return gsl_integration_qng( &f,
a,
b, epsabs, epsrel, &
result, &abserr, &neval ); }
1321 inline int qng( gsl_function
const* f,
double a,
double b,
double epsabs,
double epsrel,
1322 double*
result,
double* abserr,
size_t* neval ){
1323 return gsl_integration_qng( f,
a,
b, epsabs, epsrel,
result, abserr, neval ); }
1355 double&
result,
double& abserr ){
1356#ifndef GSL_RANGE_CHECK_OFF
1358 gsl_error(
"limit must not exceed size of workspace",
1360 return GSL_EFAILED; }
1362 return gsl_integration_qag( &f,
a,
b, epsabs, epsrel, limit,
static_cast<int>( key ),
1381 inline int qag( gsl_function* f,
double const a,
double const b,
double const epsabs,
1382 double const epsrel,
size_t const limit,
qag_key const key, workspace& workspace,
1383 double*
result,
double* abserr ){
1384#ifndef GSL_RANGE_CHECK_OFF
1385 if( limit > (workspace.get() == 0 ? 0 : workspace.get()->limit) ){
1386 gsl_error(
"limit must not exceed size of workspace",
1388 return GSL_EFAILED; }
1390 return gsl_integration_qag( f,
a,
b, epsabs, epsrel, limit,
static_cast<int>( key ),
1391 workspace.get(),
result, abserr ); }
1404 inline int qagi(
function_scl& f,
double const epsabs,
double const epsrel,
size_t const limit,
1406 return gsl_integration_qagi( &f, epsabs, epsrel, limit,
workspace.
get(), &
result, &abserr ); }
1420 inline int qagi( gsl_function* f,
double const epsabs,
double const epsrel,
size_t const limit,
1421 workspace& workspace,
double*
result,
double* abserr ){
1422 return gsl_integration_qagi( f, epsabs, epsrel, limit, workspace.get(),
result, abserr ); }
1439 return gsl_integration_qagiu( &f,
a, epsabs, epsrel, limit,
workspace.
get(), &
result, &abserr ); }
1454 inline int qagiu( gsl_function* f,
double const a,
double const epsabs,
double const epsrel,
1455 size_t const limit, workspace& workspace,
double*
result,
double* abserr ){
1456 return gsl_integration_qagiu( f,
a, epsabs, epsrel, limit, workspace.get(),
result, abserr ); }
1473 return gsl_integration_qagil( &f,
b, epsabs, epsrel, limit,
workspace.
get(),
1489 inline int qagil( gsl_function* f,
double const b,
double const epsabs,
double const epsrel,
1490 size_t const limit, workspace& workspace,
double*
result,
double* abserr ){
1491 return gsl_integration_qagil( f,
b, epsabs, epsrel, limit, workspace.get(),
1511 return gsl_integration_qags( &f,
a,
b, epsabs, epsrel, limit,
workspace.
get(),
1528 inline int qags( gsl_function* f,
double const a,
double const b,
double const epsabs,
1529 double const epsrel,
size_t const limit, workspace& workspace,
double*
result,
1531 return gsl_integration_qags( f,
a,
b, epsabs, epsrel, limit, workspace.get(),
1550 double const epsrel,
1552 return gsl_integration_qagp( &f,
const_cast<double*
>( pts ), npts, epsabs, epsrel, limit,
1570 inline int qagp( gsl_function* f,
double const* pts,
size_t const npts,
double const epsabs,
1571 double const epsrel,
1572 size_t const limit, workspace& workspace,
double*
result,
double* abserr ){
1573 return gsl_integration_qagp( f,
const_cast<double*
>( pts ), npts, epsabs, epsrel, limit,
1574 workspace.get(),
result, abserr ); }
1591 template<
typename T>
1594 size_t const npts = pts.size();
1595#ifndef GSL_RANGE_CHECK_OFF
1597 if( pts.size() < 2 ){
1598 gsl_error(
"expected pts of length 2 or greater",
1603 return gsl_integration_qagp( &f,
const_cast<double*
>( pts.data() ), npts, epsabs, epsrel,
1621 template<
typename T>
1622 inline int qagp( gsl_function* f, T
const& pts,
double const epsabs,
double const epsrel,
1623 size_t const limit, workspace& workspace,
double*
result,
double* abserr ){
1624 size_t const npts = pts.size();
1625#ifndef GSL_RANGE_CHECK_OFF
1627 if( pts.size() < 2 ){
1628 gsl_error(
"expected pts of length 2 or greater",
1633 return gsl_integration_qagp( f,
const_cast<double*
>( pts.data() ), npts, epsabs, epsrel,
1634 limit, workspace.get(),
result, abserr ); }
1652 double const epsabs,
double const epsrel,
size_t const limit,
1654 return gsl_integration_qawc( &f,
a,
b, c, epsabs, epsrel, limit,
workspace.
get(),
1672 inline int qawc( gsl_function* f,
double const a,
double const b,
double const c,
1673 double const epsabs,
double const epsrel,
size_t const limit,
1674 workspace& workspace,
double*
result,
double* abserr ){
1675 return gsl_integration_qawc( f,
a,
b, c, epsabs, epsrel, limit, workspace.get(),
1694 double const epsabs,
double const epsrel,
size_t const limit,
1696 return gsl_integration_qaws( &f,
a,
b, t.
get(), epsabs, epsrel, limit,
1714 inline int qaws( gsl_function* f,
double const a,
double const b, qaws_table& t,
1715 double const epsabs,
double const epsrel,
size_t const limit,
1716 workspace& workspace,
double*
result,
double* abserr ){
1717 return gsl_integration_qaws( f,
a,
b, t.get(), epsabs, epsrel, limit,
1718 workspace.get(),
result, abserr ); }
1736 double&
result,
double& abserr ){
1737 return gsl_integration_qawo( &f,
a, epsabs, epsrel, limit,
workspace.
get(), wf.
get(),
1754 inline int qawo( gsl_function* f,
double const a,
double const epsabs,
double const epsrel,
1755 size_t const limit, workspace& workspace, qawo_table& wf,
1756 double*
result,
double* abserr ){
1757 return gsl_integration_qawo( f,
a, epsabs, epsrel, limit, workspace.get(), wf.get(),
1777 return gsl_integration_qawf( &f,
a, epsabs, limit,
workspace.
get(), cycle_workspace.
get(),
1794 inline int qawf( gsl_function* f,
double const a,
double const epsabs,
size_t const limit,
1796 qawo_table& wf,
double*
result,
double* abserr ){
1797 return gsl_integration_qawf( f,
a, epsabs, limit, workspace.
get(), cycle_workspace.
get(),
1798 wf.get(),
result, abserr ); }
1823 try {
count =
new size_t; }
catch( std::bad_alloc& e ){
1873#ifdef __GXX_EXPERIMENTAL_CXX0X__
1879 std::swap(
count, v.count );
1880 v.ccgsl_pointer =
nullptr;
1998#ifdef __GXX_EXPERIMENTAL_CXX0X__
2014 return gsl_integration_glfixed( &f,
a,
b, t.
get() ); }
2025 inline double glfixed( gsl_function
const* f,
double const a,
double const b,
2026 glfixed_table
const& t ){
2027 return gsl_integration_glfixed( f,
a,
b, t.get() ); }
2041 inline int glfixed_point(
double const a,
double const b,
size_t const i,
double* xi,
double* wi,
2042 glfixed_table
const& t ){
2043 return gsl_integration_glfixed_point(
a,
b, i, xi, wi, t.get() ); }
2057 return gsl_integration_glfixed_point(
a,
b, i, &xi, &wi, t.
get() ); }
2080 try {
count =
new size_t; }
catch( std::bad_alloc& e ){
2130#ifdef __GXX_EXPERIMENTAL_CXX0X__
2136 std::swap(
count, v.count );
2137 v.ccgsl_pointer =
nullptr;
2255#ifdef __GXX_EXPERIMENTAL_CXX0X__
2276 double&
result,
double& abserr,
size_t& nevals ){
2277 return gsl_integration_cquad( &f,
a,
b, epsabs, epsrel, ws.
get(), &
result, &abserr, &nevals ); }
2293 inline int cquad( gsl_function
const* f,
double const a,
double const b,
double const epsabs,
2294 double const epsrel, cquad_workspace& ws,
2295 double*
result,
double* abserr,
size_t* nevals ){
2296 return gsl_integration_cquad( f,
a,
b, epsabs, epsrel, ws.get(),
result, abserr, nevals ); }
2320 try {
count =
new size_t; }
catch( std::bad_alloc& e ){
2370#ifdef __GXX_EXPERIMENTAL_CXX0X__
2376 std::swap(
count, v.count );
2377 v.ccgsl_pointer =
nullptr;
2495#ifdef __GXX_EXPERIMENTAL_CXX0X__
2512 double const epsabs,
double const epsrel,
double&
result,
2514 return gsl_integration_romberg( &f,
a,
b, epsabs, epsrel, &
result, &neval, w.
get() ); }
2527 inline int romberg( gsl_function
const* f,
double const a,
double const b,
2528 double const epsabs,
double const epsrel,
double*
result,
2529 size_t* neval, romberg_workspace& w ){
2530 return gsl_integration_romberg( f,
a,
b, epsabs, epsrel,
result, neval, w.get() ); }
2538 return gsl_integration_fixed_n( w.
get() ); }
2545 return gsl_integration_fixed_nodes( w.
get() ); }
2552 return gsl_integration_fixed_weights( w.
get() ); }
2569 inline int fixed( gsl_function
const*
func,
double*
result, fixed_workspace& w ){
2570 return gsl_integration_fixed(
func,
result, w.get() ); }
@ GSL_EFAILED
generic failure
Class that extends gsl_function so that it can be constructed from arbitrary function objects.
Workspace for CQUAD quadrature routine.
cquad_workspace(gsl_integration_cquad_workspace *v)
Could construct from a gsl_integration_cquad_workspace.
bool operator<=(cquad_workspace const &v) const
A container needs to define an ordering for sorting.
~cquad_workspace()
The destructor only deletes the pointers if count reaches zero.
bool unique() const
Find if this is the only object sharing the gsl_integration_cquad_workspace.
size_t * count
The shared reference count.
cquad_workspace & operator=(cquad_workspace &&v)
Move operator.
cquad_workspace(size_t const n)
The default constructor creates a new cquad_workspace with space for n intervals.
cquad_workspace()
The default constructor is only really useful for assigning to.
bool empty() const
Find if the cquad_workspace is empty.
bool operator>=(cquad_workspace const &v) const
A container needs to define an ordering for sorting.
bool operator!=(cquad_workspace const &v) const
Two cquad_workspace are different if their elements are not identical.
bool operator==(cquad_workspace const &v) const
Two cquad_workspace are identically equal if their elements are identical.
void swap(cquad_workspace &v)
Swap two cquad_workspace.
size_t use_count() const
Find how many cquad_workspace objects share this pointer.
cquad_workspace & operator=(cquad_workspace const &v)
The assignment operator.
bool operator<(cquad_workspace const &v) const
A container needs to define an ordering for sorting.
bool operator>(cquad_workspace const &v) const
A container needs to define an ordering for sorting.
cquad_workspace(cquad_workspace &&v)
Move constructor.
gsl_integration_cquad_workspace * ccgsl_pointer
The shared pointer.
gsl_integration_cquad_workspace * get() const
Get the gsl_integration_cquad_workspace.
cquad_workspace(cquad_workspace const &v)
The copy constructor.
Workspace for integration_fixed.
gsl_integration_fixed_workspace * get() const
Get the gsl_integration_fixed_workspace.
fixed_workspace(fixed_workspace const &v)
The copy constructor.
bool unique() const
Find if this is the only object sharing the gsl_integration_fixed_workspace.
fixed_workspace(gsl_integration_fixed_workspace *v)
Could construct from a gsl_integration_fixed_workspace.
size_t use_count() const
Find how many fixed_workspace objects share this pointer.
bool operator<(fixed_workspace const &v) const
A container needs to define an ordering for sorting.
size_t * count
The shared reference count.
fixed_workspace()
The default constructor is only really useful for assigning to.
bool empty() const
Find if the workspace is empty.
bool operator==(fixed_workspace const &v) const
Two fixed_workspace are identically equal if their elements are identical.
bool operator>=(fixed_workspace const &v) const
A container needs to define an ordering for sorting.
void swap(fixed_workspace &v)
Swap two workspace.
fixed_workspace(fixed_workspace &&v)
Move constructor.
bool operator<=(fixed_workspace const &v) const
A container needs to define an ordering for sorting.
fixed_workspace & operator=(fixed_workspace &&v)
Move operator.
fixed_workspace & operator=(fixed_workspace const &v)
The assignment operator.
bool operator>(fixed_workspace const &v) const
A container needs to define an ordering for sorting.
fixed_workspace(const gsl_integration_fixed_type *type, const size_t n, const double a, const double b, const double alpha, const double beta)
The default constructor creates a new fixed_workspace with n elements.
~fixed_workspace()
The destructor only deletes the pointers if count reaches zero.
gsl_integration_fixed_workspace * ccgsl_pointer
The shared pointer.
bool operator!=(fixed_workspace const &v) const
Two fixed_workspace are different if their elements are not identical.
Workspace for glfixed_table: used for Gauss–Legendre integration.
glfixed_table()
The default constructor is only really useful for assigning to.
bool operator>=(glfixed_table const &v) const
A container needs to define an ordering for sorting.
glfixed_table(size_t const n)
The default constructor creates a new glfixed_table with n elements.
bool operator<=(glfixed_table const &v) const
A container needs to define an ordering for sorting.
bool operator!=(glfixed_table const &v) const
Two glfixed_table are different if their elements are not identical.
glfixed_table & operator=(glfixed_table &&v)
Move operator.
glfixed_table & operator=(glfixed_table const &v)
The assignment operator.
gsl_integration_glfixed_table * get() const
Get the gsl_integration_glfixed_table.
bool operator>(glfixed_table 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.
glfixed_table(glfixed_table const &v)
The copy constructor.
glfixed_table(gsl_integration_glfixed_table *v)
Could construct from a gsl_integration_glfixed_table.
glfixed_table(glfixed_table &&v)
Move constructor.
bool operator==(glfixed_table const &v) const
Two glfixed_table are identically equal if their elements are identical.
bool empty() const
Find if the glfixed_table is empty.
bool unique() const
Find if this is the only object sharing the gsl_integration_glfixed_table.
bool operator<(glfixed_table const &v) const
A container needs to define an ordering for sorting.
~glfixed_table()
The destructor only deletes the pointers if count reaches zero.
gsl_integration_glfixed_table * ccgsl_pointer
The shared pointer.
size_t * count
The shared reference count.
void swap(glfixed_table &v)
Swap two glfixed_table.
A precomputed table of Chebychev moments.
bool operator<=(qawo_table const &v) const
A container needs to define an ordering for sorting.
qawo_table(double const omega, double const L, qawo_enum const sine, size_t const n)
The default constructor creates a new qawo_table with sine or cosine weight function or .
qawo_table & operator=(qawo_table const &v)
The assignment operator.
qawo_table(gsl_integration_qawo_table *v)
Could construct from a gsl_integration_qawo_table.
bool empty() const
Find if the qawo_table is empty.
bool unique() const
Find if this is the only object sharing the gsl_integration_qawo_table.
qawo_table()
The default constructor is only really useful for assigning to.
qawo_table(qawo_table const &v)
The copy constructor.
size_t * count
The shared reference count.
size_t use_count() const
Find how many workspace objects share this pointer.
void swap(qawo_table &v)
Swap two qawo_table.
gsl_integration_qawo_table * get() const
Get the gsl_integration_qawo_table.
bool operator<(qawo_table const &v) const
A container needs to define an ordering for sorting.
bool operator>=(qawo_table const &v) const
A container needs to define an ordering for sorting.
bool operator!=(qawo_table const &v) const
Two qawo_table are different if their elements are not identical.
bool operator==(qawo_table const &v) const
Two qawo_table are identically equal if their elements are identical.
qawo_table(qawo_table &&v)
Move constructor.
gsl_integration_qawo_table * ccgsl_pointer
The shared pointer.
bool operator>(qawo_table const &v) const
A container needs to define an ordering for sorting.
~qawo_table()
The destructor only deletes the pointers if count reaches zero.
qawo_table & operator=(qawo_table &&v)
Move operator.
A precomputed table of Chebychev moments.
bool operator<=(qaws_table const &v) const
A container needs to define an ordering for sorting.
qaws_table(gsl_integration_qaws_table *v)
Could construct from a gsl_integration_qaws_table.
void swap(qaws_table &v)
Swap two qaws_table.
bool operator!=(qaws_table const &v) const
Two qaws_table are different if their elements are not identical.
bool empty() const
Find if the qaws_table is empty.
bool unique() const
Find if this is the only object sharing the gsl_integration_qaws_table.
size_t * count
The shared reference count.
gsl_integration_qaws_table * get() const
Get the gsl_integration_qaws_table.
~qaws_table()
The destructor only deletes the pointers if count reaches zero.
bool operator==(qaws_table const &v) const
Two qaws_table are identically equal if their elements are identical.
bool operator<(qaws_table const &v) const
A container needs to define an ordering for sorting.
qaws_table()
The default constructor is only really useful for assigning to.
qaws_table & operator=(qaws_table const &v)
The assignment operator.
size_t use_count() const
Find how many workspace objects share this pointer.
qaws_table(qaws_table &&v)
Move constructor.
qaws_table & operator=(qaws_table &&v)
Move operator.
qaws_table(double const alpha, double const beta, double const mu, double const nu)
The default constructor creates a new qaws_table with singular weight function .
bool operator>(qaws_table const &v) const
A container needs to define an ordering for sorting.
qaws_table(qaws_table const &v)
The copy constructor.
gsl_integration_qaws_table * ccgsl_pointer
The shared pointer.
bool operator>=(qaws_table const &v) const
A container needs to define an ordering for sorting.
Workspace for integration.
romberg_workspace(gsl_integration_romberg_workspace *v)
Could construct from a gsl_integration_romberg_workspace.
size_t use_count() const
Find how many romberg_workspace objects share this pointer.
gsl_integration_romberg_workspace * get() const
Get the gsl_integration_romberg_workspace.
size_t * count
The shared reference count.
romberg_workspace & operator=(romberg_workspace const &v)
The assignment operator.
bool operator<(romberg_workspace const &v) const
A container needs to define an ordering for sorting.
void swap(romberg_workspace &v)
Swap two romberg_workspace.
romberg_workspace(romberg_workspace &&v)
Move constructor.
bool empty() const
Find if the romberg_workspace is empty.
bool unique() const
Find if this is the only object sharing the gsl_integration_romberg_workspace.
~romberg_workspace()
The destructor only deletes the pointers if count reaches zero.
romberg_workspace & operator=(romberg_workspace &&v)
Move operator.
bool operator!=(romberg_workspace const &v) const
Two romberg_workspace are different if their elements are not identical.
bool operator>(romberg_workspace const &v) const
A container needs to define an ordering for sorting.
bool operator==(romberg_workspace const &v) const
Two romberg_workspace are identically equal if their elements are identical.
romberg_workspace(size_t const n)
The default constructor creates a new romberg_workspace with n elements.
gsl_integration_romberg_workspace * ccgsl_pointer
The shared pointer.
bool operator>=(romberg_workspace const &v) const
A container needs to define an ordering for sorting.
romberg_workspace(romberg_workspace const &v)
The copy constructor.
romberg_workspace()
The default constructor is only really useful for assigning to.
bool operator<=(romberg_workspace const &v) const
A container needs to define an ordering for sorting.
Workspace for integration.
workspace & operator=(workspace const &v)
The assignment operator.
workspace & operator=(workspace &&v)
Move operator.
bool operator>=(workspace const &v) const
A container needs to define an ordering for sorting.
gsl_integration_workspace * get() const
Get the gsl_integration_workspace.
workspace(workspace &&v)
Move constructor.
bool operator!=(workspace const &v) const
Two workspace are different if their elements are not identical.
bool unique() const
Find if this is the only object sharing the gsl_integration_workspace.
void swap(workspace &v)
Swap two workspace.
bool operator<(workspace const &v) const
A container needs to define an ordering for sorting.
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()
The destructor only deletes the pointers if count reaches zero.
size_t * count
The shared reference count.
bool operator<=(workspace const &v) const
A container needs to define an ordering for sorting.
workspace(workspace const &v)
The copy constructor.
workspace(gsl_integration_workspace *v)
Could construct from a gsl_integration_workspace.
bool operator>(workspace const &v) const
A container needs to define an ordering for sorting.
gsl_integration_workspace * ccgsl_pointer
The shared pointer.
bool empty() const
Find if the workspace is empty.
workspace(size_t const n)
The default constructor creates a new workspace with n elements.
bool operator==(workspace const &v) const
Two workspace are identically equal if their elements are identical.
int qaws(function_scl &f, double const a, double const b, qaws_table &t, double const epsabs, double const epsrel, size_t const limit, workspace &workspace, double &result, double &abserr)
C++ version of gsl_integration_qaws().
int glfixed_point(double const a, double const b, size_t const i, double &xi, double &wi, glfixed_table const &t)
C++ version of gsl_integration_glfixed_point().
void qk51(function_scl const &f, double a, double b, double &result, double &abserr, double &resabs, double &resasc)
C++ version of gsl_integration_qk51().
void qk21(function_scl const &f, double a, double b, double &result, double &abserr, double &resabs, double &resasc)
C++ version of gsl_integration_qk21().
int qawo(function_scl &f, double const a, double const epsabs, double const epsrel, size_t const limit, workspace &workspace, qawo_table &wf, double &result, double &abserr)
C++ version of gsl_integration_qawo().
int qag(function_scl &f, double const a, double const b, double const epsabs, double const epsrel, size_t const limit, qag_key const key, workspace &workspace, double &result, double &abserr)
C++ version of gsl_integration_qag().
void qk41(function_scl const &f, double a, double b, double &result, double &abserr, double &resabs, double &resasc)
C++ version of gsl_integration_qk41().
qawo_enum
Enumerated type.
@ SINE
use sine function in qawo_table
@ COSINE
use cosine function in qawo_table
int qawc(function_scl &f, double const a, double const b, double const c, double const epsabs, double const epsrel, size_t const limit, workspace &workspace, double &result, double &abserr)
C++ version of gsl_integration_qawc().
int qags(function_scl &f, double const a, double const b, double const epsabs, double const epsrel, size_t const limit, workspace &workspace, double &result, double &abserr)
C++ version of gsl_integration_qags().
int qawo_table_set(qawo_table &t, double const omega, double const L, qawo_enum const sine)
C++ version of gsl_integration_qawo_table_set().
int cquad(function_scl const &f, double const a, double const b, double const epsabs, double const epsrel, cquad_workspace &ws, double &result, double &abserr, size_t &nevals)
C++ version of gsl_integration_cquad().
int fixed(function_scl const &func, double *result, fixed_workspace &w)
C++ version of gsl_integration_fixed().
int romberg(function_scl const &f, double const a, double const b, double const epsabs, double const epsrel, double &result, size_t &neval, romberg_workspace &w)
C++ version of gsl_integration_romberg().
void qcheb(function_scl &f, double a, double b, T &cheb12, T &cheb24)
C++ version of gsl_integration_qcheb().
double * fixed_nodes(fixed_workspace const &w)
Get a pointer to an array of nodes.
int qagil(function_scl &f, double const b, double const epsabs, double const epsrel, size_t const limit, workspace &workspace, double &result, double &abserr)
C++ version of gsl_integration_qagil().
qag_key
Keys used for qaq().
@ GAUSS51
use 51-point Gauss–Konrod rule
@ GAUSS31
use 31-point Gauss–Konrod rule
@ GAUSS21
use 21-point Gauss–Konrod rule
@ GAUSS41
use 41-point Gauss–Konrod rule
@ GAUSS15
use 15-point Gauss–Konrod rule
@ GAUSS61
use 61-point Gauss–Konrod rule
int qawo_table_set_length(qawo_table &t, double L)
C++ version of gsl_integration_qawo_table_set_length().
void qk31(function_scl const &f, double a, double b, double &result, double &abserr, double &resabs, double &resasc)
C++ version of gsl_integration_qk31().
int qagiu(function_scl &f, double const a, double const epsabs, double const epsrel, size_t const limit, workspace &workspace, double &result, double &abserr)
C++ version of gsl_integration_qagiu().
double glfixed(function_scl const &f, double const a, double const b, glfixed_table const &t)
C++ version of gsl_integration_glfixed().
int qaws_table_set(qaws_table &t, double const alpha, double const beta, int const mu, int const nu)
C++ version of gsl_integration_qaws_table_set().
int qagi(function_scl &f, double const epsabs, double const epsrel, size_t const limit, workspace &workspace, double &result, double &abserr)
C++ version of gsl_integration_qagi().
void qk15(function_scl const &f, double a, double b, double &result, double &abserr, double &resabs, double &resasc)
C++ version of gsl_integration_qk15().
size_t fixed_n(fixed_workspace const &w)
Get the number of quadrature nodes and weights.
void qk(int const n, double const xgk[], double const wg[], double const wgk[], double fv1[], double fv2[], function_scl const &f, double a, double b, double &result, double &abserr, double &resabs, double &resasc)
C++ version of gsl_integration_qk().
void qk61(function_scl const &f, double a, double b, double &result, double &abserr, double &resabs, double &resasc)
C++ version of gsl_integration_qk61().
int qng(function_scl const &f, double a, double b, double epsabs, double epsrel, double &result, double &abserr, size_t &neval)
C++ version of gsl_integration_qng().
int qagp(function_scl &f, double const *pts, size_t const npts, double const epsabs, double const epsrel, size_t const limit, workspace &workspace, double &result, double &abserr)
C++ version of gsl_integration_qagp().
int qawf(function_scl &f, double const a, double const epsabs, size_t const limit, integration::workspace &workspace, integration::workspace &cycle_workspace, qawo_table &wf, double &result, double &abserr)
C++ version of gsl_integration_qawf().
double * fixed_weights(fixed_workspace const &w)
Get a pointer to an array of weights.
gsl_multilarge_linear_type type
Typedef for shorthand.
double beta(rng const &r, double const a, double const b)
C++ version of gsl_ran_beta().
size_t n(workspace const &w)
C++ version of gsl_rstat_n().
double func(int const n, double const x)
C++ version of gsl_sf_hermite_func().
double b(int order, double qq)
C++ version of gsl_sf_mathieu_b().
double a(int order, double qq)
C++ version of gsl_sf_mathieu_a().
gsl_sf_result result
Typedef for gsl_sf_result.
The gsl package creates an interface to the GNU Scientific Library for C++.