cern_cauchy Class Template Reference

Cauchy principal value integration (CERNLIB). More...

#include <cern_cauchy.h>

Inheritance diagram for cern_cauchy:

inte

Detailed Description

template<class param_t, class func_t>
class cern_cauchy< param_t, func_t >

Cauchy principal value integration (CERNLIB).

The location of the singularity must be specified before-hand in cern_cauchy::s, and the singularity must not be at one of the endpoints. Note that when integrating a function of the form $ \frac{f(x)}{(x-s)} $, the denominator $ (x-s) $ must be specified in the argument func to integ(). This is different from how the gsl_inte_qawc operates.

The method from Longman58 is used for the decomposition of the integral, and the resulting integrals are computed using cern_gauss.

The uncertainty in the integral is not calculated, and is always given as zero. The default base integration object is of type cern_gauss. This is the CERNLIB default, but can be modified by calling set_inte(). If the singularity is outside the region of integration, then the result from the base integration object is returned without calling the error handler.

Possible errors for integ() and integ_err():

This function is based on the CERNLIB routines RCAUCH and DCAUCH which are documented at http://wwwasdoc.web.cern.ch/wwwasdoc/shortwrupsdir/d104/top.html

Definition at line 64 of file cern_cauchy.h.


Public Member Functions

int set_inte (inte< param_t, func_t > &i)
 Set the base integration object to use.
virtual int integ_err (func_t &func, double a, double b, param_t &pa, double &res, double &err)
 Integrate function func from a to b giving result res and error err.
virtual double integ (func_t &func, double a, double b, param_t &pa)
 Integrate function func from a to b.

Data Fields

double s
 The singularity (must be set before calling integ() or integ_err()).
cern_gauss< param_t, func_t > def_inte
 Default integration object.

Protected Attributes

inte< param_t, func_t > * it
 The base integration object.
Integration constants
double x [12]
double w [12]

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

Documentation generated with Doxygen and provided under the GNU Free Documentation License. See License Information for details.

Project hosting provided by SourceForge.net Logo, O2scl Sourceforge Project Page