Class inte_cauchy_cern (o2scl)¶
-
template<class func_t, class fp_t = double, class weights_t = inte_gauss_coeffs_double>
class inte_cauchy_cern : public o2scl::inte<func_t, double>¶ Cauchy principal value integration (CERNLIB)
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():
exc_einval - Singularity is on an endpoint
exc_efailed - Could not reach requested accuracy (occurs only if inte::err_nonconv is true)
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
Note
Currently supports only types
double
andlong
double
for the floating point typefp_t
.Public Functions
-
inline inte_cauchy_cern()¶
-
inline int set_inte(inte<func_t, fp_t> &i)¶
Set the base integration object to use (default is inte_cauchy_cern::def_inte of type inte_gauss_cern)
Public Members
-
fp_t s¶
The singularity (must be set before calling integ() or integ_err())
-
inte_gauss_cern<func_t, fp_t> def_inte¶
Default integration object.