herwig is hosted by Hepforge, IPPP Durham
Herwig  7.1.4

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 Member Functions

template<class T >
BinaryOpTraits< typename T::ValType, typename T::ArgType >::MulT value (const T &function, const typename T::ArgType lower, const typename T::ArgType upper) const
 The value of the integral. More...
 
template<class T >
BinaryOpTraits< typename T::ValType, typename T::ArgType >::MulT value (const T &function, const typename T::ArgType lower, const typename T::ArgType upper, typename BinaryOpTraits< typename T::ValType, typename T::ArgType >::MulT &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 &)
 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 Types inherited from ThePEG::Pointer::ReferenceCounted
typedef unsigned int CounterType
 
- 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 )
private

The assignment operator is private and must never be called.

In fact, it should not even be implemented.

◆ value() [1/2]

template<class T >
BinaryOpTraits<typename T::ValType, typename T::ArgType>::MulT 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 >
BinaryOpTraits<typename T::ValType, typename T::ArgType>::MulT Herwig::GSLIntegrator::value ( const T &  function,
const typename T::ArgType  lower,
const typename T::ArgType  upper,
typename BinaryOpTraits< typename T::ValType, typename T::ArgType >::MulT &  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: