1 #ifndef GAUDIMATH_NUMERICALINDEFINITEINTEGRAL_H 2 #define GAUDIMATH_NUMERICALINDEFINITEINTEGRAL_H 1 21 #include "CLHEP/GenericFunctions/AbsFunction.hh" 23 #include "gsl/gsl_integration.h" 25 #if defined( __clang__ ) || defined( __CLING__ ) 26 # pragma clang diagnostic push 27 # pragma clang diagnostic ignored "-Winconsistent-missing-override" 28 #elif defined( __GNUC__ ) && __GNUC__ >= 5 29 # pragma GCC diagnostic push 30 # pragma GCC diagnostic ignored "-Wsuggest-override" 36 namespace GaudiMathImplementation {
84 gsl_integration_workspace*
ws;
161 const AbsFunction& function, const
size_t index, const
double a,
165 const
double epsrel = 1.e-7, const
size_t size = 1000 );
209 const AbsFunction& function, const
size_t index, const
double a, const Points& points,
211 const
double epsabs = 1e-9, const
double epsrel = 1.e-6, const
size_t size = 1000 );
251 const AbsFunction& function, const
size_t index,
253 const
double epsabs = 1e-9, const
double epsrel = 1.e-6, const
size_t size = 1000 );
260 unsigned int dimensionality()
const override {
return m_DIM; }
263 double operator()(
double argument )
const override;
265 double operator()(
const Argument& argument )
const override;
275 const AbsFunction&
function()
const {
return *m_function; }
277 double a()
const {
return m_a; }
279 const Points&
points()
const {
return m_points; }
281 double epsabs()
const {
return m_epsabs; }
283 double epsrel()
const {
return m_epsrel; }
286 double result()
const {
return m_result; }
288 double error()
const {
return m_error; }
291 size_t size()
const {
return m_size; }
331 if ( p ) gsl_integration_workspace_free( p->
ws );
353 mutable double m_result = GSL_NEGINF;
354 mutable double m_error = GSL_POSINF;
367 #if defined( __clang__ ) || defined( __CLING__ ) 368 # pragma clang diagnostic pop 369 #elif defined( __GNUC__ ) && __GNUC__ >= 5 370 # pragma GCC diagnostic pop 376 #endif // GAUDIMATH_NUMERICALINDEFINITEINTEGRAL_H double epsrel() const
relatiove precision
Category
integration category
double result() const
previous result
double error() const
evaluate of previous error
GaudiMath::Integration::Limit limit() const
integration limit
Genfun::GaudiMathImplementation::NumericalDerivative Derivative
gsl_integration_workspace * ws
constexpr auto size(const C &c) noexcept(noexcept(c.size())) -> decltype(c.size())
GaudiMath::Integration::Category category() const
integration category
PropertyMgr & operator=(const PropertyMgr &)=delete
GaudiMath::Integration::KronrodRule rule() const
integration rule
This class is used for returning status codes from appropriate routines.
Type
type of integration (for finite limits)
double epsabs() const
absolute precision
bool hasAnalyticDerivative() const override
Does this function have an analytic derivative?
GaudiMath::Integration::Limit m_limit
GaudiMath::Integration::Category m_category
GaudiMath::Integration::Type type() const
integration type
std::unique_ptr< const AbsFunction > m_function
virtual Out operator()(const vector_of_const_< In > &inputs) const =0
double a() const
integration limit
GaudiMath::Integration::Type m_type
Limit
how to distinguish variable low and variable high limits
double fun(const std::vector< double > &x)
constexpr static const auto FAILURE
GaudiMath.h GaudiMath/GaudiMath.h.
KronrodRule
integration rule
std::vector< double > Points
typedef for vector of singular points
GaudiMath::Integration::KronrodRule m_rule
std::unique_ptr< _Workspace, gsl_ws_deleter > m_ws
The simple class for numerical integrations.
Type
the list of available types for ntuples
const Points & points() const
known singularities
void operator()(_Workspace *p) const
collection of common types for classes NumericalIndefiniteIntegral and NumericalDefiniteIntegral ...