Protected Member Functions | List of all members
o2scl::inte_cheb_gsl< func_t > Class Template Reference

Chebyshev integration base class (GSL) More...

#include <inte_qawc_gsl.h>

Inheritance diagram for o2scl::inte_cheb_gsl< func_t >:
o2scl::inte_transform_gsl< func_t > o2scl::inte_singular_gsl< func_t > o2scl::inte_kronrod_gsl< func_t > o2scl::inte_gsl o2scl::inte< func_t > o2scl::inte_qawc_gsl< func_t > o2scl::inte_qawo_gsl_sin< func_t > o2scl::inte_qaws_gsl< func_t > o2scl::inte_qawf_gsl_sin< func_t > o2scl::inte_qawo_gsl_cos< func_t > o2scl::inte_qawf_gsl_cos< func_t >

Protected Member Functions

void compute_moments (double cc, double *moment)
 Compute the Chebyshev moments.
template<class func2_t >
void inte_cheb_series (func2_t &f, double a, double b, double *cheb12, double *cheb24)
 Compute Chebyshev series expansion using a FFT method. More...
- Protected Member Functions inherited from o2scl::inte_singular_gsl< func_t >
void initialise_table (struct extrapolation_table *table)
 Initialize the table.
void append_table (struct extrapolation_table *table, double y)
 Append a result to the table.
int test_positivity (double result, double resabs)
 Test if the integrand satisfies $ f = |f| $.
void qelg (struct extrapolation_table *table, double *result, double *abserr)
 Determines the limit of a given sequence of approximations. More...
int large_interval (inte_workspace_gsl *workspace)
 Determine if an interval is large.
void reset_nrmax (inte_workspace_gsl *workspace)
 Reset workspace to work on the interval with the largest error.
int increase_nrmax (inte_workspace_gsl *workspace)
 Increase workspace.
int qags (func_t &func, const double a, const double b, const double l_epsabs, const double l_epsrel, double *result, double *abserr)
 Integration function. More...
- Protected Member Functions inherited from o2scl::inte_gsl
double rescale_error (double err, const double result_abs, const double result_asc)
 QUADPACK's nonlinear rescaling of the absolute-error estimate. More...

Additional Inherited Members

- Public Types inherited from o2scl::inte_singular_gsl< func_t >
typedef struct o2scl::inte_singular_gsl::extrapolation_table extrap_table
 A structure for extrapolation for inte_qags_gsl. More...
- Public Member Functions inherited from o2scl::inte_transform_gsl< func_t >
virtual double transform (double t, func_t &func)=0
 The transformation to apply to the user-supplied function.
virtual void gauss_kronrod (func_t &func, double a, double b, double *result, double *abserr, double *resabs, double *resasc)
 Integration wrapper for internal transformed function type.
- Public Member Functions inherited from o2scl::inte_kronrod_gsl< func_t >
int get_rule ()
 Get the Gauss-Kronrod integration rule. More...
void set_rule (int rule)
 Set the Gauss-Kronrod integration rule to be used.
int set_limit (size_t lim)
 Set the limit for the number of subdivisions of the integration region (default 1000) More...
template<class func2_t >
void gauss_kronrod_base (func2_t &func, double a, double b, double *result, double *abserr, double *resabs, double *resasc)
 The base Gauss-Kronrod integration function template. More...
- Public Member Functions inherited from o2scl::inte< func_t >
virtual double integ (func_t &func, double a, double b)
 Integrate function func from a to b.
virtual int integ_err (func_t &func, double a, double b, double &res, double &err)=0
 Integrate function func from a to b and place the result in res and the error in err.
double get_error ()
 Return the numerically estimated error in the result from the last call to integ() More...
virtual const char * type ()
 Return string denoting type ("inte")
- Public Attributes inherited from o2scl::inte< func_t >
int verbose
size_t last_iter
 The most recent number of iterations taken.
double tol_rel
 The maximum relative uncertainty in the value of the integral (default $ 10^{-8} $)
double tol_abs
 The maximum absolute uncertainty in the value of the integral (default $ 10^{-8} $)
bool err_nonconv
 If true, call the error handler if the routine does not converge or reach the desired tolerance (default true) More...
- Protected Attributes inherited from o2scl::inte_kronrod_gsl< func_t >
 The integration workspace.
int n_gk
 Size of Gauss-Kronrod arrays.
const double * x_gk
 Gauss-Kronrod abscissae pointer.
const double * w_g
 Gauss weight pointer.
const double * w_gk
 Gauss-Kronrod weight pointer.
double * f_v1
 Scratch space.
double * f_v2
 Scratch space.
- Protected Attributes inherited from o2scl::inte< func_t >
double interror
 The uncertainty for the last integration computation.

Detailed Description

template<class func_t>
class o2scl::inte_cheb_gsl< func_t >

This class provides the basic Chebyshev integration functions for use in the GSL-based integration classes which require them. See GSL-based integration routines in the User's guide for general information about the GSL integration classes.

Definition at line 46 of file inte_qawc_gsl.h.

Member Function Documentation

◆ inte_cheb_series()

template<class func_t >
template<class func2_t >
void o2scl::inte_cheb_gsl< func_t >::inte_cheb_series ( func2_t &  f,
double  a,
double  b,
double *  cheb12,
double *  cheb24 

The Chebyshev coefficients for the truncated expansions,

\[ f(x) = \frac{a_0}{2}T_0(x) + \frac{a_d}{2}T_d(x) + \sum_{k=}^{d-1} a_k^{(d)}T_k(x), \]

are computed for $ d=12 $ and $ d=24 $ using an FFT algorithm from Tolstov62 that is adapted so that the both sets of coefficients are computed simultaneously.

Given the function specified in f, this function computes the 13 Chebyshev coefficients, $ C^{12}_{k} $ of degree 12 and 25 Chebyshev coefficients of degree 24, $ C^{24}_{k} $, for the interval $ [a,b] $ using a FFT method.

These coefficients are constructed to approximate the original function with

\[ f = \sum_{k=1}^{13} C^{12}_{k} T_{k-1}(x) \]


\[ f = \sum_{k=1}^{25} C^{24}_{k} T_{k-1}(x) \]

where $ T_{k-1}(x) $ is the Chebyshev polynomial of degree $ k-1 $ evaluated at the point $ x $.

It is assumed that memory for cheb12 and cheb24 has been allocated beforehand.

Originally written in QUADPACK by R. Piessens and E. de Doncker, translated into C for GSL by Brian Gough, and then rewritten for O2scl .

Definition at line 115 of file inte_qawc_gsl.h.

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

Documentation generated with Doxygen. Provided under the GNU Free Documentation License (see License Information).