18 #pragma warning( disable : 1572 ) 20 #pragma warning( disable : 2259 ) 26 double Integral(
const Genfun::AbsFunction&
function,
const double a,
const double b,
28 const double epsabs,
const double epsrel,
const size_t size )
30 if ( 1 !=
function.dimensionality() ) {
36 const Genfun::AbsFunction& cross = Genfun::FunctionDirectProduct( &one, &
function );
38 const Genfun::AbsFunction& result =
41 return result( Genfun::Argument( 1 ) );
44 double Integral(
const Genfun::AbsFunction&
function,
const double a,
const double b,
48 if ( 1 !=
function.dimensionality() ) {
54 const Genfun::AbsFunction& cross = Genfun::FunctionDirectProduct( &one, &
function );
56 const Genfun::AbsFunction& result =
59 return result( Genfun::Argument( 1 ) );
63 const double epsabs,
const double epsrel,
const size_t size )
65 if ( 1 !=
function.dimensionality() ) {
71 const Genfun::AbsFunction& cross = Genfun::FunctionDirectProduct( &one, &
function );
73 const Genfun::AbsFunction& result =
76 return result( Genfun::Argument( 1 ) );
80 const double epsabs,
const double epsrel,
const size_t size )
82 if ( 1 !=
function.dimensionality() ) {
88 const Genfun::AbsFunction& cross = Genfun::FunctionDirectProduct( &one, &
function );
90 const Genfun::AbsFunction& result =
93 return result( Genfun::Argument( 1 ) );
100 if ( 1 !=
function.dimensionality() ) {
106 const Genfun::AbsFunction& cross = Genfun::FunctionDirectProduct( &one, &
function );
111 cross, 1, static_cast<float>( epsabs ), static_cast<float>( epsrel ), size );
113 return result( Genfun::Argument( 1 ) );
constexpr static const auto FAILURE
Define general base for Gaudi exception.
constexpr auto size(const C &c) noexcept(noexcept(c.size())) -> decltype(c.size())
Type
type of integration (for finite limits)
GaudiMath.h GaudiMath/GaudiMath.h.
GAUDI_API double Integral(const Genfun::AbsFunction &function, const double a, const double b, const GaudiMath::Integration::Type type=GaudiMath::Integration::Adaptive, const GaudiMath::Integration::KronrodRule rule=GaudiMath::Integration::Default, const double epsabs=1.e-10, const double epsrel=1.e-7, const size_t size=1000)
KronrodRule
integration rule
Genfun::GaudiMathImplementation::Constant Constant
This class allows the numerical evaluation of the following functions: