11 #include "gsl/gsl_errno.h" 12 #include "gsl/gsl_integration.h" 38 #pragma warning( disable : 1572 ) 44 #pragma warning( disable : 4996 ) 49 namespace GaudiMathImplementation
100 Exception(
"::constructor: invalid variable index" );
137 Exception(
"::constructor: invalid variable index" );
172 Exception(
"::constructor: invalid variable index" );
204 throw GaudiException(
"NumericalIndefiniteIntegral::" + message,
"*GaudiMath*", sc );
220 Exception(
"operator(): invalid argument size " );
233 if ( idx >=
m_DIM ) {
234 Exception(
"::partial(i): invalid variable index " );
238 return Genfun::FunctionNoop( &aux );
240 const AbsFunction& aux = -1 *
function();
241 return Genfun::FunctionNoop( &aux );
243 const AbsFunction& aux =
function();
244 return Genfun::FunctionNoop( &aux );
257 if ( argument.dimension() !=
m_DIM ) {
258 Exception(
"operator(): invalid argument size " );
262 for (
size_t i = 0; i <
m_DIM; ++i ) {
290 Exception(
"::operator(): invalid type " );
294 Exception(
"::operator(): invalid category " );
307 m_ws->ws = gsl_integration_workspace_alloc(
size() );
309 Exception(
"allocate()::invalid workspace" );
344 gsl_error(
"NumericalIndefiniteIntegral::QAGI", __FILE__, __LINE__, ierror );
382 if ( *lower != limits.first ) {
385 if ( *upper != limits.second ) {
386 pnts.
insert( pnts.
end(), limits.second );
394 gsl_error(
"NumericalIndefiniteIntegral::QAGI ", __FILE__, __LINE__, ierror );
432 gsl_error(
"NumericalIndefiniteIntegral::QNG ", __FILE__, __LINE__, ierror );
471 gsl_error(
"NumericalIndefiniteIntegral::QAG ", __FILE__, __LINE__, ierror );
511 gsl_error(
"NumericalIndefiniteIntegral::QAGS ", __FILE__, __LINE__, ierror );
Genfun::Derivative partial(unsigned int index) const override
Derivatives.
Define general base for Gaudi exception.
double epsrel() const
relatiove precision
StatusCode Exception(const std::string &message, const StatusCode &sc=StatusCode::FAILURE) const
double QAGI(_Function *fun) const
GaudiMath::Integration::Limit limit() const
integration limit
Genfun::GaudiMathImplementation::NumericalDerivative Derivative
gsl_integration_workspace * ws
GaudiMath::Integration::Category category() const
integration category
double QAGS(_Function *fun) const
GaudiMath::Integration::KronrodRule rule() const
integration rule
This class is used for returning status codes from appropriate routines.
_Workspace * allocate() const
allocate the integration workspace
double operator()(double argument) const override
Function value.
Type
type of integration (for finite limits)
double QNG(_Function *fun) const
double epsabs() const
absolute precision
double GSL_Adaptor(double x, void *params)
double QAG(_Function *fun) const
Numerical derivative (using GSL adaptive numerical differentiation)
GaudiMath::Integration::Limit m_limit
GaudiMath::Integration::Category m_category
unsigned int dimensionality() const override
dimensionality of the problem
GaudiMath::Integration::Type type() const
integration type
std::unique_ptr< const AbsFunction > m_function
double a() const
integration limit
T back_inserter(T...args)
GaudiMath::Integration::Type m_type
const AbsFunction & function() const
accessor to the function itself
Limit
how to distinguish variable low and variable high limits
GaudiMath.h GaudiMath/GaudiMath.h.
KronrodRule
integration rule
GaudiMath::Integration::KronrodRule m_rule
std::unique_ptr< _Workspace, gsl_ws_deleter > m_ws
AttribStringParser::Iterator begin(const AttribStringParser &parser)
double QAGP(_Function *fun) const
the simple structure to be used for adaption interface Genfun::AbsFunction to gsl_function structure ...
NumericalIndefiniteIntegral()
The simple class for numerical integrations.
const Points & points() const
known singularities
collection of common types for classes NumericalIndefiniteIntegral and NumericalDefiniteIntegral ...