Class inte_qaws_gsl (o2scl)¶
-
template<class func_t = funct>
class inte_qaws_gsl : public o2scl::inte_cheb_gsl<funct>¶ Adaptive integration with with algebraic-logarithmic singularities at the end-points (GSL)
This class computes the weighted integral
\[ \int_a^b f(x)(x - a)^\alpha (b - x)^\beta \log^\mu(x - a) \log^\nu(b - x)~dx \]where the parameters of the weight function must satisfy\[ \alpha > -1, \quad \beta > -1, \quad \mu \in \{0, 1\}, \quad \nu \in \{0, 1\}, \]and which are set by set_weight(). Note that setting \( \mu=0 \) or \( \nu=0 \) removes the respective factor \( \log^mu(\ldots) \) or \( \log^\nu(\ldots) \) from the weight.The adaptive refinement algorithm described for inte_qag_gsl is used. When a subinterval contains one of the endpoints, a special 25-point modified Clenshaw-Curtis rule is used to control the singularities. For subintervals which do not include the endpoints, a Gauss-Kronrod integration rule is used.
See GSL-based integration details in the User’s guide for general information about the GSL integration classes.
Data from \c gsl_integration_qaws_table
-
double alpha¶
-
double beta¶
-
int mu¶
-
int nu¶
-
double ri[25]¶
-
double rj[25]¶
-
double rg[25]¶
-
double rh[25]¶
-
bool fn_qaws_R¶
True if algebraic-logarithmic singularity is present at the right endpoint in the definition
f_trans
.
-
bool fn_qaws_L¶
True if algebraic-logarithmic singularity is present at the left endpoint in the definition
f_trans
.
-
double left_endpoint¶
Left endpoint in definition of
f_trans
.
-
double right_endpoint¶
Right endpoint in definition of
f_trans
.
-
inline void initialise_qaws_table()¶
Set the array values
ri
,rj
,rg
,rh
from the current valuesalpha
andbeta
.This is the function from the GSL source code
integration/qmomo.c
that initializesgsl_integration_qaws_table
.
-
inline void qc25s(func_t &func, double a, double b, double a1, double b1, double &result, double &abserr, int &err_reliable)¶
Clenshaw-Curtis 25-point integration and error estimator for functions with an algebraic-logarithmic singularity at the endpoint(s).
-
inline void compute_result(double *r, double *cheb12, double *cheb24, double &result12, double &result24)¶
Compute the 13-point and 25-point approximations from the Chebyshev moments and coefficients.
-
inline inte_qaws_gsl()¶
Initialize the adptive workspace as with the constructor inte_qag_gsl::inte_qag_gsl.
The default paramters \( \alpha, \beta, \mu, \nu \) of the weight function are all zero.
-
inline ~inte_qaws_gsl()¶
-
inline int set_weight(double u_alpha, double u_beta, int u_mu, int u_nu)¶
Sets the exponents of singularites of the weight function.
The parameters determine the exponents of the weight function
\[ W(x) = (x-a)^\alpha (b-x)^\beta \log^\mu(x-a) \log^\nu(b-x), \]and must satsify\[ \alpha > -1, \quad \beta > -1, \quad \mu \in \{0, 1\}, \quad \nu \in \{0, 1\}. \]In order for the adaptive algorithm to run quickly, a table of Chebyshev weights for the particular parameters are computed in advance.
-
inline void get_weight(double &u_alpha, double &u_beta, int &u_mu, int &u_nu)¶
Returns the current values (via reference) of the weight-function’s parameters.
-
inline virtual int integ_err(func_t &func, double a, double b, double &result, double &abserr)¶
Integrate the function
func
on the interval (a
,b
) returning theresult
and error estimateabserr
.
-
inline virtual const char *type()¶
Return string denoting type (“inte_qaws_gsl”)
-
double alpha¶