| The Gaudi Framework v28r2p1 (f1a77ff4)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Classes | Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral Class Reference

This class allows the numerical evaluation of the following functions: More...

`#include <GaudiMath/NumericalDefiniteIntegral.h>`

Inheritance diagram for Genfun::GaudiMathImplementation::NumericalDefiniteIntegral:
[legend]
Collaboration diagram for Genfun::GaudiMathImplementation::NumericalDefiniteIntegral:
[legend]

## Classes
struct | _Function
struct | _Workspace
struct | gsl_ws_deleter

## Public Types
typedef std::vector< double > | Points
| typedef for vector of singular points More...

## Public Member Functions
| NumericalDefiniteIntegral (const AbsFunction &function, const size_t index, 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)
| From CLHEP/GenericFunctions. More...
| NumericalDefiniteIntegral (const AbsFunction &function, const size_t index, const double a, const double b, const Points &points, const double epsabs=1e-9, const double epsrel=1.e-6, const size_t size=1000)
| Standard constructor The function created with this constructor compute the following integral: More...
| NumericalDefiniteIntegral (const AbsFunction &function, const size_t index, const double a, const GaudiMath::Integration::Inf b=GaudiMath::Integration::Infinity, const double epsabs=1e-9, const double epsrel=1.e-6, const size_t size=1000)
| Standard constructor The function created with this constructor compute the following integral: More...
| NumericalDefiniteIntegral (const AbsFunction &function, const size_t index, const GaudiMath::Integration::Inf a, const double b, const double epsabs=1e-9, const double epsrel=1.e-6, const size_t size=1000)
| Standard constructor The function created with this constructor compute the following integral: More...
| NumericalDefiniteIntegral (const AbsFunction &function, const size_t index, const float epsabs=1e-9, const float epsrel=1.e-6, const size_t size=1000)
| Standard constructor The function created with this constructor compute the following integral: More...
| NumericalDefiniteIntegral (const NumericalDefiniteIntegral &)
| copy constructor More...
| ~NumericalDefiniteIntegral () override=default
| destructor More...
unsigned int | dimensionality () const override
| dimensionality of the problem More...
double | operator() (double argument) const override
| Function value. More...
double | operator() (const Argument &argument) const override
| Function value. More...
bool | hasAnalyticDerivative () const override
| Does this function have an analytic derivative? More...
Genfun::Derivative | partial (unsigned int index) const override
| Derivatives. More...
const AbsFunction & | function () const
| accessor to the function itself More...
double | a () const
| integration limit More...
double | b () const
const Points & | points () const
| known singularities More...
double | epsabs () const
| absolute precision More...
double | epsrel () const
| relatiove precision More...
double | result () const
| previous result More...
double | error () const
| evaluate of previous error More...
size_t | size () const
GaudiMath::Integration::Type | type () const
| integration type More...
GaudiMath::Integration::Category | category () const
| integration category More...
GaudiMath::Integration::KronrodRule | rule () const
| integration rule More...

## Protected Member Functions
double | QAGI (_Function *fun) const
double | QAGP (_Function *fun) const
double | QNG (_Function *fun) const
double | QAG (_Function *fun) const
double | QAGS (_Function *fun) const
_Workspace * | allocate () const
| allocate the integration workspace More...
_Workspace * | ws () const
StatusCode | Exception (const std::string &message, const StatusCode &sc=StatusCode::FAILURE) const

## Private Member Functions
| NumericalDefiniteIntegral ()
NumericalDefiniteIntegral & | operator= (const NumericalDefiniteIntegral &)

## Private Attributes
std::unique_ptr< const AbsFunction > | m_function
size_t | m_DIM
size_t | m_index
double | m_a
double | m_b
bool | m_ia
bool | m_ib
GaudiMath::Integration::Type | m_type
GaudiMath::Integration::Category | m_category
GaudiMath::Integration::KronrodRule | m_rule
Points | m_points
std::unique_ptr< double[]> | m_pdata
double | m_epsabs
double | m_epsrel
double | m_result
double | m_error
size_t | m_size
std::unique_ptr< _Workspace, gsl_ws_deleter > | m_ws
Argument | m_argument
Argument | m_argF

## Detailed Description

This class allows the numerical evaluation of the following functions:

\[ {\mathcal{F}}_i \left(x_1, \dots , x_{i-1}, x_{i+1}, \dots , x_n \right) = \int\limits_{a}^{b} f \left(x_1, \dots , x_{i-1}, \hat{x}_i , x_{i+1}, \dots , x_n \right) \, {\mathrm{d}} \hat{x}_i \]

\[ {\mathcal{F}}_i \left(x_1, \dots , x_{i-1}, x_{i+1}, \dots , x_n \right) = \int\limits_{a}^{+\infty} f \left(x_1, \dots , x_{i-1}, \hat{x}_i , x_{i+1}, \dots , x_n \right) \, {\mathrm{d}} \hat{x}_i \]

\[ {\mathcal{F}}_i \left(x_1, \dots , x_{i-1}, x_{i+1}, \dots , x_n \right) = \int\limits_{-\infty}^{b} f \left(x_1, \dots , x_{i-1}, \hat{x}_i , x_{i+1}, \dots , x_n \right) \, {\mathrm{d}} \hat{x}_i \]

\[ {\mathcal{F}}_i \left(x_1, \dots , x_{i-1}, x_{i+1}, \dots , x_n \right) = \int\limits_{-\infty}^{+\infty} f \left(x_1, \dots , x_{i-1}, \hat{x}_i , x_{i+1}, \dots , x_n \right) \, {\mathrm{d}} \hat{x}_i \]

Author
  Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@i.nosp@m.tep..nosp@m.ru

Date
  2003-08-31

Definition at line 79 of file NumericalDefiniteIntegral.h.

## Member Typedef Documentation

typedef std::vector<double> Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::Points

typedef for vector of singular points

Definition at line 83 of file NumericalDefiniteIntegral.h.

## Constructor & Destructor Documentation

Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::NumericalDefiniteIntegral | ( | const AbsFunction & | function,
|  | const size_t | index,
|  | 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`
| ) |  |

From CLHEP/GenericFunctions.

Standard constructor The function created with this constructor compute the following integral:

Standard constructor The function created with this constructor compute the following integral:

\[ {\mathcal{F}}_i \left(x_1, \dots , x_{i-1}, x_{i+1}, \dots , x_n \right) = \int\limits_{a}^{b} f \left(x_1, \dots , x_{i-1}, \hat{x}_i , x_{i+1}, \dots , x_n \right) \, {\mathrm{d}} \hat{x}_i \]

If function contains singularities, the `type` = `Type::AdaptiveSingular` need to be used

For faster integration of smooth function non-adaptive integration can be used: `type` = `Type::NonAdaptive` need to be used

For adaptive integration `type` = `Type>>Adaptive` one can specify the order of Gauss-Kronrad integration rule `rule` = `KronrodRule::Gauss15` The higher-order rules give better accuracy for smooth functions, while lower-order rules save the time when the function contains local difficulties, such as discontinuites.

- The GSL routine `gsl_integration_qng` is used for `type` = `Type:NonAdaptive` :

The GSL routine `gsl_integration_qag` is used for `type` = `Type:Adaptive` :

- The GSL routine `gsl_integration_qags` is used for `type` = `Type:AdaptiveSingular` :

Parameters

  function | funtion to be integrated
  index | variable index
  a | lower intgeration limit
  b | high integration limit
  type | integration type
  rule | integration rule (for adaptive integration)
  epsabs | required absolute precision
  epsrel | required relative precision
  size | maximal number of bisections for adaptive integration

\[ {\mathcal{F}}_i \left(x_1, \dots , x_{i-1}, x_{i+1}, \dots , x_n \right) = \int\limits_{a}^{b} f \left(x_1, \dots , x_{i-1}, \hat{x}_i , x_{i+1}, \dots , x_n \right) \, {\mathrm{d}} \hat{x}_i \]

If function contains singularities, the `type` = `Type::AdaptiveSingular` need to be used

For faster integration of smooth function non-adaptive integration can be used: `type` = `Type::NonAdaptive` need to be used

For adaptive integration `type` = `Type>>Adaptive` one can specify the order of Gauss-Kronrad integration rule `rule` = `KronrodRule::Gauss15` The higher-order rules give better accuracy for smooth functions, while lower-order rules save the time when the function contains local difficulties, such as discontinuites.

- The GSL routine `gsl_integration_qng` is used for `type` = `Type:NonAdaptive` :
- The GSL routine `gsl_integration_qag` is used for `type` = `Type:Adaptive` :
- The GSL routine `gsl_integration_qags` is used for `type` = `Type:AdaptiveSingular` :

Parameters

  function | funtion to be integrated
  index | variable index
  a | lower intgeration limit
  b | high integration limit
  type | integration type
  rule | integration rule (for adaptive integration)
  epsabs | required absolute precision
  epsrel | required relative precision
  size | maximal number of bisections for adaptive integration

Definition at line 103 of file NumericalDefiniteIntegral.cpp.

112 : m_function ( function.clone () )
113 , m_DIM ( 0 )
114 , m_index ( index )
115 , m_a ( a )
116 , m_b ( b )
117 , m_ia ( false )
118 , m_ib ( false )
119 , m_type ( type )
120 , m_category ( GaudiMath::Integration::Finite )
121 , m_rule ( rule )
122 , m_epsabs ( epsabs )
123 , m_epsrel ( epsrel )
124 , m_result ( GSL_NEGINF )
125 , m_error ( GSL_POSINF )
126 , m_size ( size )
127 {
128 if ( GaudiMath::Integration::Fixed == m_rule )
129 { m_rule = GaudiMath::Integration::Default ; }
130 if ( function.dimensionality() < 2 )
131 { Exception("::constructor: invalid dimensionality ") ; }
132 if ( m_index >= function.dimensionality() )
133 { Exception("::constructor: invalid variable index") ; }
134
135 m_DIM = function.dimensionality() - 1 ;
136 m_argument = Argument( m_DIM ) ;
137 m_argF = Argument( m_DIM + 1 ) ;
138
139 }
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_epsabs
double m_epsabs
Definition: NumericalDefiniteIntegral.h:412
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::size
size_t size() const
Definition: NumericalDefiniteIntegral.h:344
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_error
double m_error
Definition: NumericalDefiniteIntegral.h:416
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::Exception
StatusCode Exception(const std::string &message, const StatusCode &sc=StatusCode::FAILURE) const
Definition: NumericalDefiniteIntegral.cpp:423
GaudiMath::Integration::Finite
Definition: Integration.h:30
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_category
GaudiMath::Integration::Category m_category
Definition: NumericalDefiniteIntegral.h:406
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_epsrel
double m_epsrel
Definition: NumericalDefiniteIntegral.h:413
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_size
size_t m_size
Definition: NumericalDefiniteIntegral.h:418
GaudiMath::Integration::Fixed
Definition: Integration.h:34
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_b
double m_b
Definition: NumericalDefiniteIntegral.h:401
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_DIM
size_t m_DIM
Definition: NumericalDefiniteIntegral.h:397
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::dimensionality
unsigned int dimensionality() const override
dimensionality of the problem
Definition: NumericalDefiniteIntegral.h:311
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_index
size_t m_index
Definition: NumericalDefiniteIntegral.h:398
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::epsabs
double epsabs() const
absolute precision
Definition: NumericalDefiniteIntegral.h:334
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_rule
GaudiMath::Integration::KronrodRule m_rule
Definition: NumericalDefiniteIntegral.h:407
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_ia
bool m_ia
Definition: NumericalDefiniteIntegral.h:402
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_result
double m_result
Definition: NumericalDefiniteIntegral.h:415
GaudiMath::Integration::Default
Definition: Integration.h:41
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::epsrel
double epsrel() const
relatiove precision
Definition: NumericalDefiniteIntegral.h:336
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_a
double m_a
Definition: NumericalDefiniteIntegral.h:400
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_type
GaudiMath::Integration::Type m_type
Definition: NumericalDefiniteIntegral.h:405
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::type
GaudiMath::Integration::Type type() const
integration type
Definition: NumericalDefiniteIntegral.h:348
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_function
std::unique_ptr< const AbsFunction > m_function
Definition: NumericalDefiniteIntegral.h:396
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_argF
Argument m_argF
Definition: NumericalDefiniteIntegral.h:422
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_ib
bool m_ib
Definition: NumericalDefiniteIntegral.h:403
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::b
double b() const
Definition: NumericalDefiniteIntegral.h:330
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_argument
Argument m_argument
Definition: NumericalDefiniteIntegral.h:421
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::rule
GaudiMath::Integration::KronrodRule rule() const
integration rule
Definition: NumericalDefiniteIntegral.h:354
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::a
double a() const
integration limit
Definition: NumericalDefiniteIntegral.h:329

Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::NumericalDefiniteIntegral | ( | const AbsFunction & | function,
|  | const size_t | index,
|  | const double | a,
|  | const double | b,
|  | const Points & | points,
|  | const double | epsabs = `1e-9`,
|  | const double | epsrel = `1.e-6`,
|  | const size_t | size = `1000`
| ) |  |

Standard constructor The function created with this constructor compute the following integral:

standard constructor

\[ {\mathcal{F}}_i \left(x_1, \dots , x_{i-1}, x_{i+1}, \dots , x_n \right) = \int\limits_{a}^{b} f \left(x_1, \dots , x_{i-1}, \hat{x}_i , x_{i+1}, \dots , x_n \right) \, {\mathrm{d}} \hat{x}_i \]

where function have known singulatities

- The GSL routine `gsl_integration_qagp` is used for integration

Parameters

  function | funtion to be integrated
  index | variable index
  a | lower intgeration limit
  b | high integration limit
  pointns | vector of know singular points
  epsabs | required absolute precision
  epsrel | required relative precision
  size | maximal number of bisections for adaptive integration
  function | the base function
  index | the variable index
  a | integration limit
  b | integration limit
  points | list of known function singularities
  epsabs | absolute precision for integration
  epsrel | relative precision for integration

Definition at line 152 of file NumericalDefiniteIntegral.cpp.

160 : m_function ( function.clone() )
161 , m_DIM ( 0 )
162 , m_index ( index )
163 , m_a ( a )
164 , m_b ( b )
165 , m_ia ( false )
166 , m_ib ( false )
167 , m_type ( GaudiMath::Integration:: Other )
168 , m_category ( GaudiMath::Integration:: Singular )
169 , m_rule ( GaudiMath::Integration:: Fixed )
170 , m_points ( points )
171 , m_epsabs ( epsabs )
172 , m_epsrel ( epsrel )
173 //
174 , m_result ( GSL_NEGINF )
175 , m_error ( GSL_POSINF )
176 //
177 , m_size ( size )
178 {
179 if ( function.dimensionality() < 2 )
180 { Exception("::constructor: invalid dimensionality ") ; }
181 if ( m_index >= function.dimensionality() )
182 { Exception("::constructor: invalid variable index") ; }
183
184 m_DIM = function.dimensionality() - 1 ;
185 m_argument = Argument( m_DIM ) ;
186 m_argF = Argument( m_DIM + 1 ) ;
187
188 const double l1 = std::min ( a , b ) ;
189 const double l2 = std::max ( a , b ) ;
190 m_points.push_back ( l1 ) ;
191 m_points.push_back ( l2 ) ;
192 // TODO: replace by remove_if (<l1,>l2), unique, erase and sort...
193 std::sort ( m_points.begin() , m_points.end() ) ;
194 m_points.erase( std::unique( m_points.begin () , m_points.end () ) ,
195 m_points.end() );
196
197 auto lower = std::lower_bound ( m_points.begin () , m_points.end () , l1 ) ;
198 m_points.erase( m_points.begin () , lower ) ;
199 auto upper = std::upper_bound ( m_points.begin () , m_points.end () , l2 ) ;
200 m_points.erase( upper , m_points.end () ) ;
201
202 m_pdata.reset( new double[ m_points.size() ] );
203 std::copy( m_points.begin() , m_points.end() , m_pdata.get() );
204 }
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_epsabs
double m_epsabs
Definition: NumericalDefiniteIntegral.h:412
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::size
size_t size() const
Definition: NumericalDefiniteIntegral.h:344
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_error
double m_error
Definition: NumericalDefiniteIntegral.h:416
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::Exception
StatusCode Exception(const std::string &message, const StatusCode &sc=StatusCode::FAILURE) const
Definition: NumericalDefiniteIntegral.cpp:423
std::copy
T copy(T...args)
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_category
GaudiMath::Integration::Category m_category
Definition: NumericalDefiniteIntegral.h:406
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_epsrel
double m_epsrel
Definition: NumericalDefiniteIntegral.h:413
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_size
size_t m_size
Definition: NumericalDefiniteIntegral.h:418
std::upper_bound
T upper_bound(T...args)
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_b
double m_b
Definition: NumericalDefiniteIntegral.h:401
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_DIM
size_t m_DIM
Definition: NumericalDefiniteIntegral.h:397
std::vector::end
T end(T...args)
std::lower_bound
T lower_bound(T...args)
GaudiMath::Integration::Singular
Definition: Integration.h:31
std::unique
T unique(T...args)
std::min
T min(T...args)
std::vector::push_back
T push_back(T...args)
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::dimensionality
unsigned int dimensionality() const override
dimensionality of the problem
Definition: NumericalDefiniteIntegral.h:311
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_index
size_t m_index
Definition: NumericalDefiniteIntegral.h:398
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::epsabs
double epsabs() const
absolute precision
Definition: NumericalDefiniteIntegral.h:334
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_points
Points m_points
Definition: NumericalDefiniteIntegral.h:409
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_rule
GaudiMath::Integration::KronrodRule m_rule
Definition: NumericalDefiniteIntegral.h:407
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_ia
bool m_ia
Definition: NumericalDefiniteIntegral.h:402
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_result
double m_result
Definition: NumericalDefiniteIntegral.h:415
std::vector::erase
T erase(T...args)
std::unique_ptr::reset
T reset(T...args)
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_pdata
std::unique_ptr< double[]> m_pdata
Definition: NumericalDefiniteIntegral.h:410
std::max
T max(T...args)
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::epsrel
double epsrel() const
relatiove precision
Definition: NumericalDefiniteIntegral.h:336
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_a
double m_a
Definition: NumericalDefiniteIntegral.h:400
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_type
GaudiMath::Integration::Type m_type
Definition: NumericalDefiniteIntegral.h:405
std::unique_ptr::get
T get(T...args)
std::vector::size
T size(T...args)
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_function
std::unique_ptr< const AbsFunction > m_function
Definition: NumericalDefiniteIntegral.h:396
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::points
const Points & points() const
known singularities
Definition: NumericalDefiniteIntegral.h:332
std::vector::begin
T begin(T...args)
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_argF
Argument m_argF
Definition: NumericalDefiniteIntegral.h:422
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_ib
bool m_ib
Definition: NumericalDefiniteIntegral.h:403
std::sort
T sort(T...args)
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::b
double b() const
Definition: NumericalDefiniteIntegral.h:330
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_argument
Argument m_argument
Definition: NumericalDefiniteIntegral.h:421
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::a
double a() const
integration limit
Definition: NumericalDefiniteIntegral.h:329

Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::NumericalDefiniteIntegral | ( | const AbsFunction & | function,
|  | const size_t | index,
|  | const double | a,
|  | const GaudiMath::Integration::Inf | b = `GaudiMath::Integration::Infinity`,
|  | const double | epsabs = `1e-9`,
|  | const double | epsrel = `1.e-6`,
|  | const size_t | size = `1000`
| ) |  |

Standard constructor The function created with this constructor compute the following integral:

\[ {\mathcal{F}}_i \left(x_1, \dots , x_{i-1}, x_{i+1}, \dots , x_n \right) = \int\limits_{a}^{+\infty} f \left(x_1, \dots , x_{i-1}, \hat{x}_i , x_{i+1}, \dots , x_n \right) \, {\mathrm{d}} \hat{x}_i \]

- The GSL routine `gsl_integration_qagiu` is used for integration

Parameters

  function | funtion to be integrated
  index | variable index
  a | lower intgeration limit
  b | indication for infinity
  epsabs | required absolute precision
  epsrel | required relative precision
  size | maximal number of bisections for adaptive integration

Definition at line 232 of file NumericalDefiniteIntegral.cpp.

239 : m_function ( function.clone() )
240 , m_DIM ( 0 )
241 , m_index ( index )
242 , m_a ( a )
243 , m_b ( GSL_POSINF )
244 , m_ia ( false )
245 , m_ib ( true )
246 , m_type ( GaudiMath::Integration:: Other )
247 , m_category ( GaudiMath::Integration:: Infinite )
248 , m_rule ( GaudiMath::Integration:: Fixed )
249 , m_epsabs ( epsabs )
250 , m_epsrel ( epsrel )
251 //
252 , m_result ( GSL_NEGINF )
253 , m_error ( GSL_POSINF )
254 //
255 , m_size ( size )
256 {
257 if ( function.dimensionality() < 2 )
258 { Exception("::constructor: invalid dimensionality ") ; }
259 if ( m_index >= function.dimensionality() )
260 { Exception("::constructor: invalid variable index") ; }
261
262 m_DIM = function.dimensionality() - 1 ;
263 m_argument = Argument( m_DIM ) ;
264 m_argF = Argument( m_DIM + 1 ) ;
265
266 }
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_epsabs
double m_epsabs
Definition: NumericalDefiniteIntegral.h:412
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::size
size_t size() const
Definition: NumericalDefiniteIntegral.h:344
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_error
double m_error
Definition: NumericalDefiniteIntegral.h:416
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::Exception
StatusCode Exception(const std::string &message, const StatusCode &sc=StatusCode::FAILURE) const
Definition: NumericalDefiniteIntegral.cpp:423
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_category
GaudiMath::Integration::Category m_category
Definition: NumericalDefiniteIntegral.h:406
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_epsrel
double m_epsrel
Definition: NumericalDefiniteIntegral.h:413
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_size
size_t m_size
Definition: NumericalDefiniteIntegral.h:418
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_b
double m_b
Definition: NumericalDefiniteIntegral.h:401
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_DIM
size_t m_DIM
Definition: NumericalDefiniteIntegral.h:397
GaudiMath::Integration::Infinite
Definition: Integration.h:32
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::dimensionality
unsigned int dimensionality() const override
dimensionality of the problem
Definition: NumericalDefiniteIntegral.h:311
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_index
size_t m_index
Definition: NumericalDefiniteIntegral.h:398
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::epsabs
double epsabs() const
absolute precision
Definition: NumericalDefiniteIntegral.h:334
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_rule
GaudiMath::Integration::KronrodRule m_rule
Definition: NumericalDefiniteIntegral.h:407
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_ia
bool m_ia
Definition: NumericalDefiniteIntegral.h:402
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_result
double m_result
Definition: NumericalDefiniteIntegral.h:415
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::epsrel
double epsrel() const
relatiove precision
Definition: NumericalDefiniteIntegral.h:336
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_a
double m_a
Definition: NumericalDefiniteIntegral.h:400
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_type
GaudiMath::Integration::Type m_type
Definition: NumericalDefiniteIntegral.h:405
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_function
std::unique_ptr< const AbsFunction > m_function
Definition: NumericalDefiniteIntegral.h:396
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_argF
Argument m_argF
Definition: NumericalDefiniteIntegral.h:422
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_ib
bool m_ib
Definition: NumericalDefiniteIntegral.h:403
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_argument
Argument m_argument
Definition: NumericalDefiniteIntegral.h:421
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::a
double a() const
integration limit
Definition: NumericalDefiniteIntegral.h:329

Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::NumericalDefiniteIntegral | ( | const AbsFunction & | function,
|  | const size_t | index,
|  | const GaudiMath::Integration::Inf | a,
|  | const double | b,
|  | const double | epsabs = `1e-9`,
|  | const double | epsrel = `1.e-6`,
|  | const size_t | size = `1000`
| ) |  |

Standard constructor The function created with this constructor compute the following integral:

\[ {\mathcal{F}}_i \left(x_1, \dots , x_{i-1}, x_{i+1}, \dots , x_n \right) = \int\limits_{-\infty}^{b} f \left(x_1, \dots , x_{i-1}, \hat{x}_i , x_{i+1}, \dots , x_n \right) \, {\mathrm{d}} \hat{x}_i \]

- The GSL routine `gsl_integration_qagiu` is used for integration

Parameters

  function | funtion to be integrated
  index | variable index
  a | lower intgeration limit
  b | indication for infinity
  epsabs | required absolute precision
  epsrel | required relative precision
  size | maximal number of bisections for adaptive integration

Definition at line 295 of file NumericalDefiniteIntegral.cpp.

302 : m_function ( function.clone() )
303 , m_DIM ( 0 )
304 , m_index ( index )
305 , m_a ( GSL_NEGINF )
306 , m_b ( b )
307 , m_ia ( true )
308 , m_ib ( false )
309 , m_type ( GaudiMath::Integration:: Other )
310 , m_category ( GaudiMath::Integration:: Infinite )
311 , m_rule ( GaudiMath::Integration:: Fixed )
312 , m_epsabs ( epsabs )
313 , m_epsrel ( epsrel )
314 //
315 , m_result ( GSL_NEGINF )
316 , m_error ( GSL_POSINF )
317 //
318 , m_size ( size )
319 {
320 if ( function.dimensionality() < 2 )
321 { Exception("::constructor: invalid dimensionality ") ; }
322 if ( m_index >= function.dimensionality() )
323 { Exception("::constructor: invalid variable index") ; }
324
325 m_DIM = function.dimensionality() - 1 ;
326 m_argument = Argument( m_DIM ) ;
327 m_argF = Argument( m_DIM + 1 ) ;
328 }
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_epsabs
double m_epsabs
Definition: NumericalDefiniteIntegral.h:412
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::size
size_t size() const
Definition: NumericalDefiniteIntegral.h:344
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_error
double m_error
Definition: NumericalDefiniteIntegral.h:416
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::Exception
StatusCode Exception(const std::string &message, const StatusCode &sc=StatusCode::FAILURE) const
Definition: NumericalDefiniteIntegral.cpp:423
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_category
GaudiMath::Integration::Category m_category
Definition: NumericalDefiniteIntegral.h:406
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_epsrel
double m_epsrel
Definition: NumericalDefiniteIntegral.h:413
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_size
size_t m_size
Definition: NumericalDefiniteIntegral.h:418
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_b
double m_b
Definition: NumericalDefiniteIntegral.h:401
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_DIM
size_t m_DIM
Definition: NumericalDefiniteIntegral.h:397
GaudiMath::Integration::Infinite
Definition: Integration.h:32
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::dimensionality
unsigned int dimensionality() const override
dimensionality of the problem
Definition: NumericalDefiniteIntegral.h:311
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_index
size_t m_index
Definition: NumericalDefiniteIntegral.h:398
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::epsabs
double epsabs() const
absolute precision
Definition: NumericalDefiniteIntegral.h:334
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_rule
GaudiMath::Integration::KronrodRule m_rule
Definition: NumericalDefiniteIntegral.h:407
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_ia
bool m_ia
Definition: NumericalDefiniteIntegral.h:402
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_result
double m_result
Definition: NumericalDefiniteIntegral.h:415
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::epsrel
double epsrel() const
relatiove precision
Definition: NumericalDefiniteIntegral.h:336
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_a
double m_a
Definition: NumericalDefiniteIntegral.h:400
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_type
GaudiMath::Integration::Type m_type
Definition: NumericalDefiniteIntegral.h:405
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_function
std::unique_ptr< const AbsFunction > m_function
Definition: NumericalDefiniteIntegral.h:396
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_argF
Argument m_argF
Definition: NumericalDefiniteIntegral.h:422
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_ib
bool m_ib
Definition: NumericalDefiniteIntegral.h:403
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::b
double b() const
Definition: NumericalDefiniteIntegral.h:330
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_argument
Argument m_argument
Definition: NumericalDefiniteIntegral.h:421

Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::NumericalDefiniteIntegral | ( | const AbsFunction & | function,
|  | const size_t | index,
|  | const float | epsabs = `1e-9`,
|  | const float | epsrel = `1.e-6`,
|  | const size_t | size = `1000`
| ) |  |

Standard constructor The function created with this constructor compute the following integral:

\[ {\mathcal{F}}_i \left(x_1, \dots , x_{i-1}, x_{i+1}, \dots , x_n \right) = \int\limits_{-\infty}^{+\infty} f \left(x_1, \dots , x_{i-1}, \hat{x}_i , x_{i+1}, \dots , x_n \right) \, {\mathrm{d}} \hat{x}_i \]

- The GSL routine `gsl_integration_qagi` is used for integration

Parameters

  function | funtion to be integrated
  index | variable index
  epsabs | required absolute precision
  epsrel | required relative precision
  size | maximal number of bisections for adaptive integration

Definition at line 354 of file NumericalDefiniteIntegral.cpp.

359 : AbsFunction()
360 , m_function ( function.clone() )
361 , m_DIM ( 0 )
362 , m_index ( index )
363 , m_a ( GSL_NEGINF )
364 , m_b ( GSL_POSINF )
365 , m_ia ( true )
366 , m_ib ( true )
367 , m_type ( GaudiMath::Integration:: Other )
368 , m_category ( GaudiMath::Integration:: Infinite )
369 , m_rule ( GaudiMath::Integration:: Fixed )
370 , m_epsabs ( epsabs )
371 , m_epsrel ( epsrel )
372 //
373 , m_result ( GSL_NEGINF )
374 , m_error ( GSL_POSINF )
375 //
376 , m_size ( size )
377 {
378 if ( function.dimensionality() < 2 )
379 { Exception("::constructor: invalid dimensionality ") ; }
380 if ( m_index >= function.dimensionality() )
381 { Exception("::constructor: invalid variable index") ; }
382
383 m_DIM = function.dimensionality() - 1 ;
384 m_argument = Argument( m_DIM ) ;
385 m_argF = Argument( m_DIM + 1 ) ;
386
387 }
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_epsabs
double m_epsabs
Definition: NumericalDefiniteIntegral.h:412
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::size
size_t size() const
Definition: NumericalDefiniteIntegral.h:344
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_error
double m_error
Definition: NumericalDefiniteIntegral.h:416
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::Exception
StatusCode Exception(const std::string &message, const StatusCode &sc=StatusCode::FAILURE) const
Definition: NumericalDefiniteIntegral.cpp:423
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_category
GaudiMath::Integration::Category m_category
Definition: NumericalDefiniteIntegral.h:406
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_epsrel
double m_epsrel
Definition: NumericalDefiniteIntegral.h:413
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_size
size_t m_size
Definition: NumericalDefiniteIntegral.h:418
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_b
double m_b
Definition: NumericalDefiniteIntegral.h:401
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_DIM
size_t m_DIM
Definition: NumericalDefiniteIntegral.h:397
GaudiMath::Integration::Infinite
Definition: Integration.h:32
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::dimensionality
unsigned int dimensionality() const override
dimensionality of the problem
Definition: NumericalDefiniteIntegral.h:311
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_index
size_t m_index
Definition: NumericalDefiniteIntegral.h:398
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::epsabs
double epsabs() const
absolute precision
Definition: NumericalDefiniteIntegral.h:334
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_rule
GaudiMath::Integration::KronrodRule m_rule
Definition: NumericalDefiniteIntegral.h:407
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_ia
bool m_ia
Definition: NumericalDefiniteIntegral.h:402
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_result
double m_result
Definition: NumericalDefiniteIntegral.h:415
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::epsrel
double epsrel() const
relatiove precision
Definition: NumericalDefiniteIntegral.h:336
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_a
double m_a
Definition: NumericalDefiniteIntegral.h:400
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_type
GaudiMath::Integration::Type m_type
Definition: NumericalDefiniteIntegral.h:405
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_function
std::unique_ptr< const AbsFunction > m_function
Definition: NumericalDefiniteIntegral.h:396
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_argF
Argument m_argF
Definition: NumericalDefiniteIntegral.h:422
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_ib
bool m_ib
Definition: NumericalDefiniteIntegral.h:403
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_argument
Argument m_argument
Definition: NumericalDefiniteIntegral.h:421

Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::NumericalDefiniteIntegral | ( | const NumericalDefiniteIntegral & | right | ) |

copy constructor

Definition at line 391 of file NumericalDefiniteIntegral.cpp.

392 : AbsFunction ()
393 , m_function ( right.m_function->clone() )
394 , m_DIM ( right.m_DIM )
395 , m_index ( right.m_index )
396 , m_a ( right.m_a )
397 , m_b ( right.m_b )
398 , m_ia ( right.m_ia )
399 , m_ib ( right.m_ib )
400 , m_type ( right.m_type )
401 , m_category ( right.m_category )
402 , m_rule ( right.m_rule )
403 , m_points ( right.m_points )
404 , m_epsabs ( right.m_epsabs )
405 , m_epsrel ( right.m_epsrel )
406 , m_result ( GSL_NEGINF )
407 , m_error ( GSL_POSINF )
408 , m_size ( right.m_size )
409 , m_argument ( right.m_argument )
410 , m_argF ( right.m_argF )
411 {
412 if( right.m_pdata )
413 {
414 m_pdata.reset( new double[m_points.size()] );
415 std::copy( m_points.begin() , m_points.end() , m_pdata.get() );
416 }
417 }
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_epsabs
double m_epsabs
Definition: NumericalDefiniteIntegral.h:412
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_error
double m_error
Definition: NumericalDefiniteIntegral.h:416
std::copy
T copy(T...args)
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_category
GaudiMath::Integration::Category m_category
Definition: NumericalDefiniteIntegral.h:406
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_epsrel
double m_epsrel
Definition: NumericalDefiniteIntegral.h:413
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_size
size_t m_size
Definition: NumericalDefiniteIntegral.h:418
std::right
T right(T...args)
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_b
double m_b
Definition: NumericalDefiniteIntegral.h:401
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_DIM
size_t m_DIM
Definition: NumericalDefiniteIntegral.h:397
std::vector::end
T end(T...args)
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_index
size_t m_index
Definition: NumericalDefiniteIntegral.h:398
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_points
Points m_points
Definition: NumericalDefiniteIntegral.h:409
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_rule
GaudiMath::Integration::KronrodRule m_rule
Definition: NumericalDefiniteIntegral.h:407
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_ia
bool m_ia
Definition: NumericalDefiniteIntegral.h:402
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_result
double m_result
Definition: NumericalDefiniteIntegral.h:415
std::unique_ptr::reset
T reset(T...args)
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_pdata
std::unique_ptr< double[]> m_pdata
Definition: NumericalDefiniteIntegral.h:410
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_a
double m_a
Definition: NumericalDefiniteIntegral.h:400
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_type
GaudiMath::Integration::Type m_type
Definition: NumericalDefiniteIntegral.h:405
std::unique_ptr::get
T get(T...args)
std::vector::size
T size(T...args)
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_function
std::unique_ptr< const AbsFunction > m_function
Definition: NumericalDefiniteIntegral.h:396
std::vector::begin
T begin(T...args)
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_argF
Argument m_argF
Definition: NumericalDefiniteIntegral.h:422
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_ib
bool m_ib
Definition: NumericalDefiniteIntegral.h:403
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_argument
Argument m_argument
Definition: NumericalDefiniteIntegral.h:421

Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::~NumericalDefiniteIntegral | ( |  | ) |
| override default

destructor

Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::NumericalDefiniteIntegral | ( |  | ) |
| private

## Member Function Documentation

double Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::a | ( |  | ) | const
| inline

integration limit

Definition at line 329 of file NumericalDefiniteIntegral.h.

329 { return m_a ; }
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_a
double m_a
Definition: NumericalDefiniteIntegral.h:400

NumericalDefiniteIntegral::_Workspace * Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::allocate | ( |  | ) | const
| protected

allocate the integration workspace

Definition at line 529 of file NumericalDefiniteIntegral.cpp.

530 {
531 if ( !m_ws ) {
532 m_ws.reset( new _Workspace() );
533 m_ws->ws = gsl_integration_workspace_alloc( size () );
534 if ( !m_ws->ws ) { Exception ( "allocate()::invalid workspace" ) ; };
535 }
536 return m_ws.get() ;
537 }
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::size
size_t size() const
Definition: NumericalDefiniteIntegral.h:344
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::Exception
StatusCode Exception(const std::string &message, const StatusCode &sc=StatusCode::FAILURE) const
Definition: NumericalDefiniteIntegral.cpp:423
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_ws
std::unique_ptr< _Workspace, gsl_ws_deleter > m_ws
Definition: NumericalDefiniteIntegral.h:419

double Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::b | ( |  | ) | const
| inline

Definition at line 330 of file NumericalDefiniteIntegral.h.

330 { return m_b ; }
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_b
double m_b
Definition: NumericalDefiniteIntegral.h:401

GaudiMath::Integration::Category Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::category | ( |  | ) | const
| inline

integration category

Definition at line 351 of file NumericalDefiniteIntegral.h.

351 { return m_category ; }
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_category
GaudiMath::Integration::Category m_category
Definition: NumericalDefiniteIntegral.h:406

unsigned int Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::dimensionality | ( |  | ) | const
| inline override

dimensionality of the problem

Definition at line 311 of file NumericalDefiniteIntegral.h.

311 { return m_DIM ; }
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_DIM
size_t m_DIM
Definition: NumericalDefiniteIntegral.h:397

double Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::epsabs | ( |  | ) | const
| inline

absolute precision

Definition at line 334 of file NumericalDefiniteIntegral.h.

334 { return m_epsabs ; }
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_epsabs
double m_epsabs
Definition: NumericalDefiniteIntegral.h:412

double Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::epsrel | ( |  | ) | const
| inline

relatiove precision

Definition at line 336 of file NumericalDefiniteIntegral.h.

336 { return m_epsrel ; }
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_epsrel
double m_epsrel
Definition: NumericalDefiniteIntegral.h:413

double Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::error | ( |  | ) | const
| inline

evaluate of previous error

Definition at line 341 of file NumericalDefiniteIntegral.h.

341 { return m_error ; }
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_error
double m_error
Definition: NumericalDefiniteIntegral.h:416

StatusCode Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::Exception | ( | const std::string & | message,
|  | const StatusCode & | sc = `StatusCode::FAILURE`
| ) |  | const
| protected

Definition at line 423 of file NumericalDefiniteIntegral.cpp.

425 {
426 throw GaudiException( "NumericalDefiniteIntegral::" + message ,
427 "*GaudiMath*" , sc ) ;
428 return sc ;
429 }
GaudiException
Define general base for Gaudi exception.
Definition: GaudiException.h:23

const AbsFunction& Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::function | ( |  | ) | const
| inline

accessor to the function itself

Definition at line 327 of file NumericalDefiniteIntegral.h.

327 { return *m_function ; }
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_function
std::unique_ptr< const AbsFunction > m_function
Definition: NumericalDefiniteIntegral.h:396

bool Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::hasAnalyticDerivative | ( |  | ) | const
| inline override

Does this function have an analytic derivative?

Definition at line 319 of file NumericalDefiniteIntegral.h.

319 { return true ;}

double Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::operator() | ( | double | argument | ) | const
| override

Function value.

evaluate the function

Definition at line 436 of file NumericalDefiniteIntegral.cpp.

437 {
438 // reset the result and the error
439 m_result = GSL_NEGINF ;
440 m_error = GSL_POSINF ;
441
442 // check the argument
443 if( 1 != m_DIM ) { Exception ( "operator(): invalid argument size " ) ; };
444
445 m_argument[0] = argument ;
446 return (*this) ( m_argument );
447 }
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_error
double m_error
Definition: NumericalDefiniteIntegral.h:416
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::Exception
StatusCode Exception(const std::string &message, const StatusCode &sc=StatusCode::FAILURE) const
Definition: NumericalDefiniteIntegral.cpp:423
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_DIM
size_t m_DIM
Definition: NumericalDefiniteIntegral.h:397
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_result
double m_result
Definition: NumericalDefiniteIntegral.h:415
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_argument
Argument m_argument
Definition: NumericalDefiniteIntegral.h:421

double Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::operator() | ( | const Argument & | argument | ) | const
| override

Function value.

evaluate the function

Definition at line 469 of file NumericalDefiniteIntegral.cpp.

470 {
471 // reset the result and the error
472 m_result = GSL_NEGINF ;
473 m_error = GSL_POSINF ;
474
475 // check the argument
476 if( argument.dimension() != m_DIM )
477 { Exception ( "operator(): invalid argument size " ) ; };
478
479 // copy the argument
480
481 for( size_t i = 0 ; i < m_DIM ; ++i )
482 {
483 m_argument [i] = argument [i] ;
484 const size_t j = i < m_index ? i : i + 1 ;
485 m_argF [j] = argument [i] ;
486 };
487
488 // create the helper object
489 GSL_Helper helper( *m_function , m_argF , m_index );
490
491 // use GSL to evaluate the numerical derivative
492 gsl_function F ;
493 F.function = &GSL_Adaptor ;
494 F.params = &helper ;
495 _Function F1 ;
496 F1.fn = &F ;
497
498 if ( GaudiMath::Integration::Infinite == category () )
499 { return QAGI ( &F1 ) ; } // RETURN
500
501 if ( m_a == m_b )
502 {
503 m_result = 0 ; m_error = 0 ; // EXACT
504 return m_result ; // RETURN
505 }
506
507 if ( GaudiMath::Integration::Singular == category () )
508 { return QAGP ( &F1 ) ; } // RETURN
509 else if ( GaudiMath::Integration::Finite == category () )
510 if ( GaudiMath::Integration::NonAdaptive == type () )
511 { return QNG ( &F1 ) ; } // RETURN
512 else if ( GaudiMath::Integration::Adaptive == type () )
513 { return QAG ( &F1 ) ; } // RETURN
514 else if ( GaudiMath::Integration::AdaptiveSingular == type () )
515 { return QAGS ( &F1 ) ; } // RETURN
516 else
517 { Exception ( "::operator(): invalid type " ); }
518 else
519 { Exception ( "::operator(): invalid category " ); }
520
521 return 0 ;
522 }
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::category
GaudiMath::Integration::Category category() const
integration category
Definition: NumericalDefiniteIntegral.h:351
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_error
double m_error
Definition: NumericalDefiniteIntegral.h:416
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::Exception
StatusCode Exception(const std::string &message, const StatusCode &sc=StatusCode::FAILURE) const
Definition: NumericalDefiniteIntegral.cpp:423
GaudiMath::Integration::Finite
Definition: Integration.h:30
GaudiMath::Integration::NonAdaptive
Definition: Integration.h:25
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_b
double m_b
Definition: NumericalDefiniteIntegral.h:401
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_DIM
size_t m_DIM
Definition: NumericalDefiniteIntegral.h:397
GaudiMath::Integration::Adaptive
Definition: Integration.h:26
GaudiMath::Integration::Singular
Definition: Integration.h:31
GaudiMath::Integration::Infinite
Definition: Integration.h:32
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_index
size_t m_index
Definition: NumericalDefiniteIntegral.h:398
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_result
double m_result
Definition: NumericalDefiniteIntegral.h:415
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::QAG
double QAG(_Function *fun) const
Definition: NumericalDefiniteIntegral.cpp:646
Genfun::GaudiMathImplementation::GSL_Adaptor
double GSL_Adaptor(double x, void *params)
Definition: Helpers.cpp:37
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_a
double m_a
Definition: NumericalDefiniteIntegral.h:400
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::type
GaudiMath::Integration::Type type() const
integration type
Definition: NumericalDefiniteIntegral.h:348
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_function
std::unique_ptr< const AbsFunction > m_function
Definition: NumericalDefiniteIntegral.h:396
GaudiMath::Integration::AdaptiveSingular
Definition: Integration.h:27
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::QAGP
double QAGP(_Function *fun) const
Definition: NumericalDefiniteIntegral.cpp:587
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_argF
Argument m_argF
Definition: NumericalDefiniteIntegral.h:422
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::QNG
double QNG(_Function *fun) const
Definition: NumericalDefiniteIntegral.cpp:617
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::QAGI
double QAGI(_Function *fun) const
Definition: NumericalDefiniteIntegral.cpp:543
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_argument
Argument m_argument
Definition: NumericalDefiniteIntegral.h:421
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::QAGS
double QAGS(_Function *fun) const
Definition: NumericalDefiniteIntegral.cpp:677

NumericalDefiniteIntegral& Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::operator= | ( | const NumericalDefiniteIntegral & |  | ) |
| private

Genfun::Derivative Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::partial | ( | unsigned int | index | ) | const
| override

Derivatives.

Definition at line 454 of file NumericalDefiniteIntegral.cpp.

455 {
456 if ( idx >= m_DIM )
457 { Exception ( "::partial(i): invalid variable index " ) ; };
458 //
459 const AbsFunction& aux = NumericalDerivative( *this , idx ) ;
460 return Genfun::FunctionNoop( &aux ) ;
461 }
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::Exception
StatusCode Exception(const std::string &message, const StatusCode &sc=StatusCode::FAILURE) const
Definition: NumericalDefiniteIntegral.cpp:423
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_DIM
size_t m_DIM
Definition: NumericalDefiniteIntegral.h:397

const Points& Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::points | ( |  | ) | const
| inline

known singularities

Definition at line 332 of file NumericalDefiniteIntegral.h.

332 { return m_points ; }
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_points
Points m_points
Definition: NumericalDefiniteIntegral.h:409

double Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::QAG | ( | _Function * | fun | ) | const
| protected

Definition at line 646 of file NumericalDefiniteIntegral.cpp.

647 {
648 if( !F ) { Exception("QAG::invalid function") ; }
649
650 // allocate workspace
651 allocate () ;
652
653 // integration limits
654 const double low = std::min ( m_a , m_b ) ;
655 const double high = std::max ( m_a , m_b ) ;
656
657 int ierror =
658 gsl_integration_qag ( F->fn ,
659 low , high ,
660 m_epsabs , m_epsrel ,
661 size () , (int) rule() , ws ()->ws ,
662 &m_result , &m_error );
663
664 if( ierror ) { gsl_error( "NumericalDefiniteIntegral::QAG " ,
665 __FILE__ , __LINE__ , ierror ) ; }
666
667 // sign
668 if ( m_a > m_b ) { m_result *= -1 ; }
669
670 return m_result ;
671 }
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_epsabs
double m_epsabs
Definition: NumericalDefiniteIntegral.h:412
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::size
size_t size() const
Definition: NumericalDefiniteIntegral.h:344
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_error
double m_error
Definition: NumericalDefiniteIntegral.h:416
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::Exception
StatusCode Exception(const std::string &message, const StatusCode &sc=StatusCode::FAILURE) const
Definition: NumericalDefiniteIntegral.cpp:423
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::ws
_Workspace * ws() const
Definition: NumericalDefiniteIntegral.h:372
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_epsrel
double m_epsrel
Definition: NumericalDefiniteIntegral.h:413
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_b
double m_b
Definition: NumericalDefiniteIntegral.h:401
std::min
T min(T...args)
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_result
double m_result
Definition: NumericalDefiniteIntegral.h:415
std::max
T max(T...args)
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_a
double m_a
Definition: NumericalDefiniteIntegral.h:400
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::allocate
_Workspace * allocate() const
allocate the integration workspace
Definition: NumericalDefiniteIntegral.cpp:529
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::rule
GaudiMath::Integration::KronrodRule rule() const
integration rule
Definition: NumericalDefiniteIntegral.h:354

double Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::QAGI | ( | _Function * | fun | ) | const
| protected

Definition at line 543 of file NumericalDefiniteIntegral.cpp.

544 {
545 // check the argument
546 if ( !F ) { Exception("::QAGI: invalid function"); }
547
548 // allocate workspace
549 allocate() ;
550
551 int ierror = 0 ;
552
553 if ( m_ia && m_ib )
554 {
555 ierror = gsl_integration_qagi ( F->fn ,
556 m_epsabs , m_epsrel ,
557 size () , ws()->ws ,
558 &m_result , &m_error ) ;
559 }
560 else if ( m_ia )
561 {
562 ierror = gsl_integration_qagil ( F->fn , m_b ,
563 m_epsabs , m_epsrel ,
564 size () , ws()->ws ,
565 &m_result , &m_error ) ;
566 }
567 else if ( m_ib )
568 {
569 ierror = gsl_integration_qagiu ( F->fn , m_a ,
570 m_epsabs , m_epsrel ,
571 size () , ws()->ws ,
572 &m_result , &m_error ) ;
573 }
574 else
575 { Exception ( "::QAGI: invalid mode" ) ; };
576
577 if( ierror ) { gsl_error( "NumericalDefiniteIntegral::QAGI" ,
578 __FILE__ , __LINE__ , ierror ) ;}
579
580 return m_result ;
581 }
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_epsabs
double m_epsabs
Definition: NumericalDefiniteIntegral.h:412
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::size
size_t size() const
Definition: NumericalDefiniteIntegral.h:344
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_error
double m_error
Definition: NumericalDefiniteIntegral.h:416
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::Exception
StatusCode Exception(const std::string &message, const StatusCode &sc=StatusCode::FAILURE) const
Definition: NumericalDefiniteIntegral.cpp:423
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::ws
_Workspace * ws() const
Definition: NumericalDefiniteIntegral.h:372
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_epsrel
double m_epsrel
Definition: NumericalDefiniteIntegral.h:413
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_b
double m_b
Definition: NumericalDefiniteIntegral.h:401
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_ia
bool m_ia
Definition: NumericalDefiniteIntegral.h:402
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_result
double m_result
Definition: NumericalDefiniteIntegral.h:415
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_a
double m_a
Definition: NumericalDefiniteIntegral.h:400
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::allocate
_Workspace * allocate() const
allocate the integration workspace
Definition: NumericalDefiniteIntegral.cpp:529
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_ib
bool m_ib
Definition: NumericalDefiniteIntegral.h:403

double Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::QAGP | ( | _Function * | fun | ) | const
| protected

Definition at line 587 of file NumericalDefiniteIntegral.cpp.

588 {
589 if( !F ) { Exception("QAGP::invalid function") ; }
590
591 // no known singular points ?
592 if( points().empty() || !m_pdata ) { return QAGS( F ) ; }
593
594 const size_t npts = points().size();
595
596 // use GSL
597 int ierror =
598 gsl_integration_qagp ( F->fn ,
599 m_pdata.get() , npts ,
600 m_epsabs , m_epsrel ,
601 size () , ws()->ws ,
602 &m_result , &m_error ) ;
603
604 if( ierror ) { gsl_error( "NumericalDefiniteIntegral::QAGI " ,
605 __FILE__ , __LINE__ , ierror ) ; }
606
607 // the sign
608 if ( m_a > m_b ) { m_result *= -1 ; }
609
610 return m_result ;
611 }
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_epsabs
double m_epsabs
Definition: NumericalDefiniteIntegral.h:412
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::size
size_t size() const
Definition: NumericalDefiniteIntegral.h:344
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_error
double m_error
Definition: NumericalDefiniteIntegral.h:416
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::Exception
StatusCode Exception(const std::string &message, const StatusCode &sc=StatusCode::FAILURE) const
Definition: NumericalDefiniteIntegral.cpp:423
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::ws
_Workspace * ws() const
Definition: NumericalDefiniteIntegral.h:372
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::_Workspace::ws
gsl_integration_workspace * ws
Definition: NumericalDefiniteIntegral.h:82
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_epsrel
double m_epsrel
Definition: NumericalDefiniteIntegral.h:413
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_b
double m_b
Definition: NumericalDefiniteIntegral.h:401
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_result
double m_result
Definition: NumericalDefiniteIntegral.h:415
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_pdata
std::unique_ptr< double[]> m_pdata
Definition: NumericalDefiniteIntegral.h:410
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_a
double m_a
Definition: NumericalDefiniteIntegral.h:400
std::unique_ptr::get
T get(T...args)
std::vector::size
T size(T...args)
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::points
const Points & points() const
known singularities
Definition: NumericalDefiniteIntegral.h:332
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::QAGS
double QAGS(_Function *fun) const
Definition: NumericalDefiniteIntegral.cpp:677

double Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::QAGS | ( | _Function * | fun | ) | const
| protected

Definition at line 677 of file NumericalDefiniteIntegral.cpp.

678 {
679 if( !F ) { Exception("QAG::invalid function") ; }
680
681 if ( m_a == m_b )
682 {
683 m_result = 0 ;
684 m_error = 0 ; // EXACT !
685 return m_result ;
686 }
687
688 // allocate workspace
689 allocate () ;
690
691 // integration limits
692 const double low = std::min ( m_a , m_b ) ;
693 const double high = std::max ( m_a , m_b ) ;
694
695 int ierror =
696 gsl_integration_qags ( F->fn ,
697 low , high ,
698 m_epsabs , m_epsrel ,
699 size () , ws()->ws ,
700 &m_result , &m_error );
701
702 if( ierror ) { gsl_error( "NumericalDefiniteIntegral::QAGS " ,
703 __FILE__ , __LINE__ , ierror ) ; }
704
705 // sign
706 if ( m_a > m_b ) { m_result *= -1 ; }
707
708 return m_result ;
709 }
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_epsabs
double m_epsabs
Definition: NumericalDefiniteIntegral.h:412
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::size
size_t size() const
Definition: NumericalDefiniteIntegral.h:344
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_error
double m_error
Definition: NumericalDefiniteIntegral.h:416
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::Exception
StatusCode Exception(const std::string &message, const StatusCode &sc=StatusCode::FAILURE) const
Definition: NumericalDefiniteIntegral.cpp:423
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::ws
_Workspace * ws() const
Definition: NumericalDefiniteIntegral.h:372
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_epsrel
double m_epsrel
Definition: NumericalDefiniteIntegral.h:413
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_b
double m_b
Definition: NumericalDefiniteIntegral.h:401
std::min
T min(T...args)
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_result
double m_result
Definition: NumericalDefiniteIntegral.h:415
std::max
T max(T...args)
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_a
double m_a
Definition: NumericalDefiniteIntegral.h:400
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::allocate
_Workspace * allocate() const
allocate the integration workspace
Definition: NumericalDefiniteIntegral.cpp:529

double Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::QNG | ( | _Function * | fun | ) | const
| protected

Definition at line 617 of file NumericalDefiniteIntegral.cpp.

618 {
619 if( !F ) { Exception("QNG::invalid function") ; }
620
621 // integration limits
622 const double low = std::min ( m_a , m_b ) ;
623 const double high = std::max ( m_a , m_b ) ;
624
625 size_t neval = 0 ;
626 int ierror =
627 gsl_integration_qng ( F->fn ,
628 low , high ,
629 m_epsabs , m_epsrel ,
630 &m_result , &m_error , &neval ) ;
631
632 if( ierror ) { gsl_error( "NumericalIndefiniteIntegral::QNG " ,
633 __FILE__ , __LINE__ , ierror ) ; }
634
635 // sign
636 if ( m_a > m_b ) { m_result *= -1 ; }
637
638 return m_result ;
639 }
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_epsabs
double m_epsabs
Definition: NumericalDefiniteIntegral.h:412
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_error
double m_error
Definition: NumericalDefiniteIntegral.h:416
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::Exception
StatusCode Exception(const std::string &message, const StatusCode &sc=StatusCode::FAILURE) const
Definition: NumericalDefiniteIntegral.cpp:423
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_epsrel
double m_epsrel
Definition: NumericalDefiniteIntegral.h:413
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_b
double m_b
Definition: NumericalDefiniteIntegral.h:401
std::min
T min(T...args)
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_result
double m_result
Definition: NumericalDefiniteIntegral.h:415
std::max
T max(T...args)
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_a
double m_a
Definition: NumericalDefiniteIntegral.h:400

double Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::result | ( |  | ) | const
| inline

previous result

Definition at line 339 of file NumericalDefiniteIntegral.h.

339 { return m_result ; }
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_result
double m_result
Definition: NumericalDefiniteIntegral.h:415

GaudiMath::Integration::KronrodRule Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::rule | ( |  | ) | const
| inline

integration rule

Definition at line 354 of file NumericalDefiniteIntegral.h.

354 { return m_rule ; }
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_rule
GaudiMath::Integration::KronrodRule m_rule
Definition: NumericalDefiniteIntegral.h:407

size_t Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::size | ( |  | ) | const
| inline

Definition at line 344 of file NumericalDefiniteIntegral.h.

344 { return m_size ; }
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_size
size_t m_size
Definition: NumericalDefiniteIntegral.h:418

GaudiMath::Integration::Type Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::type | ( |  | ) | const
| inline

integration type

Definition at line 348 of file NumericalDefiniteIntegral.h.

348 { return m_type ; }
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_type
GaudiMath::Integration::Type m_type
Definition: NumericalDefiniteIntegral.h:405

_Workspace* Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::ws | ( |  | ) | const
| inline protected

Definition at line 372 of file NumericalDefiniteIntegral.h.

373 { return m_ws.get() ; };
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_ws
std::unique_ptr< _Workspace, gsl_ws_deleter > m_ws
Definition: NumericalDefiniteIntegral.h:419

## Member Data Documentation

double Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_a
| private

Definition at line 400 of file NumericalDefiniteIntegral.h.

Argument Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_argF
| mutable private

Definition at line 422 of file NumericalDefiniteIntegral.h.

Argument Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_argument
| mutable private

Definition at line 421 of file NumericalDefiniteIntegral.h.

double Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_b
| private

Definition at line 401 of file NumericalDefiniteIntegral.h.

GaudiMath::Integration::Category Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_category
| private

Definition at line 406 of file NumericalDefiniteIntegral.h.

size_t Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_DIM
| private

Definition at line 397 of file NumericalDefiniteIntegral.h.

double Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_epsabs
| private

Definition at line 412 of file NumericalDefiniteIntegral.h.

double Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_epsrel
| private

Definition at line 413 of file NumericalDefiniteIntegral.h.

double Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_error
| mutable private

Definition at line 416 of file NumericalDefiniteIntegral.h.

std::unique_ptr<const AbsFunction> Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_function
| private

Definition at line 396 of file NumericalDefiniteIntegral.h.

bool Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_ia
| private

Definition at line 402 of file NumericalDefiniteIntegral.h.

bool Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_ib
| private

Definition at line 403 of file NumericalDefiniteIntegral.h.

size_t Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_index
| private

Definition at line 398 of file NumericalDefiniteIntegral.h.

std::unique_ptr<double[]> Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_pdata
| private

Definition at line 410 of file NumericalDefiniteIntegral.h.

Points Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_points
| private

Definition at line 409 of file NumericalDefiniteIntegral.h.

double Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_result
| mutable private

Definition at line 415 of file NumericalDefiniteIntegral.h.

GaudiMath::Integration::KronrodRule Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_rule
| private

Definition at line 407 of file NumericalDefiniteIntegral.h.

size_t Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_size
| private

Definition at line 418 of file NumericalDefiniteIntegral.h.

GaudiMath::Integration::Type Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_type
| private

Definition at line 405 of file NumericalDefiniteIntegral.h.

std::unique_ptr<_Workspace,gsl_ws_deleter> Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_ws
| mutable private

Definition at line 419 of file NumericalDefiniteIntegral.h.

The documentation for this class was generated from the following files:

- GaudiGSL/GaudiMath/NumericalDefiniteIntegral.h
- GaudiGSL/src/Lib/NumericalDefiniteIntegral.cpp