Object-oriented Scientific Computing Library: Version 0.910
Public Member Functions | Protected Member Functions | Protected Attributes
gsl_inte_qaws< func_t > Class Template Reference

Adaptive integration with with algebraic-logarithmic singularities at the end-points (GSL) More...

#include <gsl_inte_qaws.h>

Inheritance diagram for gsl_inte_qaws< func_t >:
gsl_inte_cheb< func_t > gsl_inte_transform< func_t > gsl_inte_singular< func_t > gsl_inte_kronrod< func_t > gsl_inte inte< func_t >

Detailed Description

template<class func_t = funct>
class gsl_inte_qaws< func_t >

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 gsl_inte_qag 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 routines in the User's guide for general information about the GSL integration classes.

Definition at line 77 of file gsl_inte_qaws.h.

Public Member Functions

 gsl_inte_qaws ()
 Initialize the adptive workspace as with the constructor gsl_inte_qag::gsl_inte_qag.
int set_weight (double u_alpha, double u_beta, int u_mu, int u_nu)
 Sets the exponents of singularites of the weight function.
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.
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 the result and error estimate abserr.
const char * type ()
 Return string denoting type ("gsl_inte_qaws")

Protected Member Functions

void initialise_qaws_table ()
 Set the array values ri, rj, rg, rh from the current values alpha and beta.
virtual double transform (double t, func_t &func)
 Weighted integrand.
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).
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.

Protected Attributes

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.
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]

Constructor & Destructor Documentation

template<class func_t = funct>
gsl_inte_qaws< func_t >::gsl_inte_qaws ( ) [inline]

The default paramters $ \alpha, \beta, \mu, \nu $ of the weight function are all zero.

Definition at line 367 of file gsl_inte_qaws.h.


Member Function Documentation

template<class func_t = funct>
void gsl_inte_qaws< func_t >::initialise_qaws_table ( ) [inline, protected]

This is the function from the GSL source code integration/qmomo.c that initializes gsl_integration_qaws_table.

Definition at line 104 of file gsl_inte_qaws.h.

template<class func_t = funct>
int gsl_inte_qaws< func_t >::set_weight ( double  u_alpha,
double  u_beta,
int  u_mu,
int  u_nu 
) [inline]

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.

Definition at line 388 of file gsl_inte_qaws.h.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

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

Get Object-oriented Scientific Computing
Lib at SourceForge.net. Fast, secure and Free Open Source software
downloads.