Class inte_cheb_gsl (o2scl)¶
-
template<class func_t>
class inte_cheb_gsl : public o2scl::inte_transform_gsl<func_t>¶ Chebyshev integration base class (GSL)
This class provides the basic Chebyshev integration functions for use in the GSL-based integration classes which require them.
See GSL-based integration details in the User’s guide for general information about the GSL integration classes.
Subclassed by o2scl::inte_qawc_gsl< func_t >, o2scl::inte_qawo_gsl_sin< func_t >, o2scl::inte_qaws_gsl< func_t >
Protected Functions
-
inline void compute_moments(double cc, double *moment)¶
Compute the Chebyshev moments.
-
template<class func2_t>
inline void inte_cheb_series(func2_t &f, double a, double b, double *cheb12, double *cheb24)¶ Compute Chebyshev series expansion using a FFT method.
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.The FFT algorithm, from [Tolstov62], 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) \]and\[ 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
andcheb24
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 .
-
inline void compute_moments(double cc, double *moment)¶