Herwig
7.2.1
|
This class is designed to integrate a given function between 2 limits using the gsl QAGS integration subroutine. More...
#include <GSLIntegrator.h>
Public Types | |
template<class T > | |
using | ValT = decltype(std::declval< typename T::ValType >() *std::declval< typename T::ArgType >()) |
helper type for the integration result | |
Public Types inherited from ThePEG::Pointer::ReferenceCounted | |
typedef unsigned int | CounterType |
Public Member Functions | |
template<class T > | |
ValT< T > | value (const T &function, const typename T::ArgType lower, const typename T::ArgType upper) const |
The value of the integral. More... | |
template<class T > | |
ValT< T > | value (const T &function, const typename T::ArgType lower, const typename T::ArgType upper, ValT< T > &error) const |
The value of the integral. More... | |
Standard constructors and destructors. | |
GSLIntegrator () | |
Default Constructor uses values in GSL manual as parameters. | |
GSLIntegrator (double abserr, double relerr, int nbins) | |
Specify all the parameters. More... | |
Public Member Functions inherited from ThePEG::Pointer::ReferenceCounted | |
CounterType | referenceCount () const |
Private Member Functions | |
GSLIntegrator & | operator= (const GSLIntegrator &)=delete |
The assignment operator is private and must never be called. More... | |
Private Attributes | |
double | _abserr |
The parameters controlling the absolute error. | |
double | _relerr |
The parameters controlling the relative error. | |
int | _nbins |
The maximum number of intervals to use. | |
Additional Inherited Members | |
Public Attributes inherited from ThePEG::Pointer::ReferenceCounted | |
const unsigned long | uniqueId |
Protected Member Functions inherited from ThePEG::Pointer::ReferenceCounted | |
ReferenceCounted (const ReferenceCounted &) | |
ReferenceCounted & | operator= (const ReferenceCounted &) |
ReferenceCounted (const ReferenceCounted &) | |
ReferenceCounted & | operator= (const ReferenceCounted &) |
This class is designed to integrate a given function between 2 limits using the gsl QAGS integration subroutine.
The function is supplied using a templated class that must define operator(argument). The units of the argument ArgType and return type ValType must be supplied in the integrand class using a typedef i.e.
struct integrand {
...
Energy operator(double arg) const;
typedef double ArgType
typedef Energy ValType
...
}
Definition at line 40 of file GSLIntegrator.h.
|
inline |
Specify all the parameters.
abserr | Absolute error. |
relerr | Relative error. |
nbins | Number of bins |
Definition at line 57 of file GSLIntegrator.h.
|
privatedelete |
The assignment operator is private and must never be called.
In fact, it should not even be implemented.
|
inline |
The value of the integral.
function | The integrand class that defines operator() |
lower | The lower limit of integration. |
upper | The upper limit of integration. |
|
inline |
The value of the integral.
function | The integrand class that defines operator() |
lower | The lower limit of integration. |
upper | The upper limit of integration. |
error | Returns the estimated error of the integral |