herwig is hosted by Hepforge, IPPP Durham
Herwig  7.2.1
Herwig::GSLIntegrator Class Reference

This class is designed to integrate a given function between 2 limits using the gsl QAGS integration subroutine. More...

#include <GSLIntegrator.h>

Inheritance diagram for Herwig::GSLIntegrator:

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

GSLIntegratoroperator= (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 &)
 
ReferenceCountedoperator= (const ReferenceCounted &)
 
 ReferenceCounted (const ReferenceCounted &)
 
ReferenceCountedoperator= (const ReferenceCounted &)
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ GSLIntegrator()

Herwig::GSLIntegrator::GSLIntegrator ( double  abserr,
double  relerr,
int  nbins 
)
inline

Specify all the parameters.

Parameters
abserrAbsolute error.
relerrRelative error.
nbinsNumber of bins

Definition at line 57 of file GSLIntegrator.h.

Member Function Documentation

◆ operator=()

GSLIntegrator& Herwig::GSLIntegrator::operator= ( const GSLIntegrator )
privatedelete

The assignment operator is private and must never be called.

In fact, it should not even be implemented.

◆ value() [1/2]

template<class T >
ValT<T> Herwig::GSLIntegrator::value ( const T &  function,
const typename T::ArgType  lower,
const typename T::ArgType  upper 
) const
inline

The value of the integral.

Parameters
functionThe integrand class that defines operator()
lowerThe lower limit of integration.
upperThe upper limit of integration.

◆ value() [2/2]

template<class T >
ValT<T> Herwig::GSLIntegrator::value ( const T &  function,
const typename T::ArgType  lower,
const typename T::ArgType  upper,
ValT< T > &  error 
) const
inline

The value of the integral.

Parameters
functionThe integrand class that defines operator()
lowerThe lower limit of integration.
upperThe upper limit of integration.
errorReturns the estimated error of the integral

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