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

Cauchy principal value integration (CERNLIB) More...

#include <inte_cauchy_cern.h>

Inheritance diagram for o2scl::inte_cauchy_cern< func_t >:
o2scl::inte< func_t >

Public Member Functions

int set_inte (inte< func_t > &i)
 Set the base integration object to use (default is inte_cauchy_cern::def_inte of type inte_gauss_cern)
virtual int integ_err (func_t &func, double a, double b, double &res, double &err)
 Integrate function func from a to b.
- 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.
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

double s
 The singularity (must be set before calling integ() or integ_err())
inte_gauss_cern< func_t > def_inte
 Default integration object.
- 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

inte< func_t > * it
 The base integration object.
Integration constants
double x [12]
double w [12]
- 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_cauchy_cern< func_t >

The location of the singularity must be specified before-hand in inte_cauchy_cern::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 inte_qawc_gsl operates.

The method from Longman58 is used for the decomposition of the integral, and the resulting integrals are computed using a user-specified base integration object.

The uncertainty in the integral is not calculated, and is always given as zero. The default base integration object is of type inte_gauss_cern. 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

Definition at line 66 of file inte_cauchy_cern.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).