1 #ifndef GAUDIMATH_NUMERICALDEFINITEINTEGRAL_H
2 #define GAUDIMATH_NUMERICALDEFINITEINTEGRAL_H 1
20 #include "CLHEP/GenericFunctions/AbsFunction.hh"
22 #include "gsl/gsl_integration.h"
26 namespace GaudiMathImplementation
140 ( const AbsFunction& function ,
148 const
double epsabs = 1.e-10 ,
149 const
double epsrel = 1.e-7 ,
150 const
size_t size = 1000 );
182 ( const AbsFunction& function ,
186 const Points& points ,
187 const
double epsabs = 1e-9 ,
188 const
double epsrel = 1.e-6 ,
189 const
size_t size = 1000 ) ;
218 ( const AbsFunction& function ,
223 const
double epsabs = 1e-9 ,
224 const
double epsrel = 1.e-6 ,
225 const
size_t size = 1000 ) ;
253 ( const AbsFunction& function ,
257 const
double epsabs = 1e-9 ,
258 const
double epsrel = 1.e-6 ,
259 const
size_t size = 1000 ) ;
285 ( const AbsFunction& function ,
290 const
float epsabs = 1e-9 ,
291 const
float epsrel = 1.e-6 ,
292 const
size_t size = 1000 ) ;
298 virtual ~NumericalDefiniteIntegral() =
default;
303 virtual
unsigned int dimensionality()
const {
return m_DIM ; }
306 virtual double operator() (
double argument )
const ;
308 virtual double operator() (
const Argument& argument )
const ;
319 const AbsFunction&
function ()
const {
return *m_function ; }
321 double a ()
const {
return m_a ; }
322 double b ()
const {
return m_b ; }
324 const Points&
points ()
const {
return m_points ; }
326 double epsabs ()
const {
return m_epsabs ; }
328 double epsrel ()
const {
return m_epsrel ; }
331 double result ()
const {
return m_result ; }
333 double error ()
const {
return m_error ; }
336 size_t size ()
const {
return m_size ; }
340 type ()
const {
return m_type ; }
346 rule ()
const {
return m_rule ; }
351 double QAGI ( _Function*
fun )
const ;
353 double QAGP ( _Function*
fun )
const ;
355 double QNG ( _Function*
fun )
const ;
357 double QAG ( _Function*
fun )
const ;
359 double QAGS ( _Function*
fun )
const ;
362 _Workspace* allocate ()
const ;
365 {
return m_ws.get() ; };
382 if (p) gsl_integration_workspace_free ( p->
ws ) ;
424 #endif // GAUDIMATH_NUMERICALDEFINITEINTEGRAL_H
virtual bool hasAnalyticDerivative() const
Does this function have an analytic derivative?
GaudiMath::Integration::Category category() const
integration category
gsl_integration_workspace * ws
GaudiMath::Integration::Category m_category
Category
integration category
double result() const
previous result
std::unique_ptr< _Workspace, gsl_ws_deleter > m_ws
Genfun::GaudiMathImplementation::NumericalDerivative Derivative
double epsabs() const
absolute precision
GaudiMath::Integration::KronrodRule m_rule
This class is used for returning status codes from appropriate routines.
Type
type of integration (for finite limits)
double error() const
evaluate of previous error
std::unique_ptr< double[]> m_pdata
double epsrel() const
relatiove precision
void operator()(_Workspace *p) const
GaudiMath::Integration::Type m_type
GaudiMath::Integration::Type type() const
integration type
std::unique_ptr< const AbsFunction > m_function
std::vector< double > Points
typedef for vector of singular points
const Points & points() const
known singularities
double fun(const std::vector< double > &x)
GaudiMath.h GaudiMath/GaudiMath.h.
KronrodRule
integration rule
Type
the list of available types for ntuples
GaudiMath::Integration::KronrodRule rule() const
integration rule
double a() const
integration limit
collection of common types for classes NumericalIndefiniteIntegral and NumericalDefiniteIntegral ...
This class allows the numerical evaluation of the following functions: