| The Gaudi Framework v27r1

- 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...
virtual | ~NumericalDefiniteIntegral ()=default
| destructor More...
virtual unsigned int | dimensionality () const
| dimensionality of the problem More...
virtual double | operator() (double argument) const
| Function value. More...
virtual double | operator() (const Argument &argument) const
| Function value. More...
virtual bool | hasAnalyticDerivative () const
| Does this function have an analytic derivative? More...
virtual Genfun::Derivative | partial (unsigned int index) const
| 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 71 of file NumericalDefiniteIntegral.h.

## Member Typedef Documentation

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

typedef for vector of singular points

Definition at line 75 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.

from CLHEP/GenericFunctions

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

Definition at line 107 of file NumericalDefiniteIntegral.cpp.

116 : m_function ( function.clone () )
117 , m_DIM ( 0 )
118 , m_index ( index )
119 , m_a ( a )
120 , m_b ( b )
121 , m_ia ( false )
122 , m_ib ( false )
123 , m_type ( type )
124 , m_category ( GaudiMath::Integration::Finite )
125 , m_rule ( rule )
126 , m_epsabs ( epsabs )
127 , m_epsrel ( epsrel )
128 , m_result ( GSL_NEGINF )
129 , m_error ( GSL_POSINF )
130 , m_size ( size )
131 {
132 if ( GaudiMath::Integration::Fixed == m_rule )
133 { m_rule = GaudiMath::Integration::Default ; }
134 if ( function.dimensionality() < 2 )
135 { Exception("::constructor: invalid dimensionality ") ; }
136 if ( m_index >= function.dimensionality() )
137 { Exception("::constructor: invalid variable index") ; }
138
139 m_DIM = function.dimensionality() - 1 ;
140 m_argument = Argument( m_DIM ) ;
141 m_argF = Argument( m_DIM + 1 ) ;
142
143 }
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_epsabs
double m_epsabs
Definition: NumericalDefiniteIntegral.h:404
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::size
size_t size() const
Definition: NumericalDefiniteIntegral.h:336
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::dimensionality
virtual unsigned int dimensionality() const
dimensionality of the problem
Definition: NumericalDefiniteIntegral.h:303
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_error
double m_error
Definition: NumericalDefiniteIntegral.h:408
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::Exception
StatusCode Exception(const std::string &message, const StatusCode &sc=StatusCode::FAILURE) const
Definition: NumericalDefiniteIntegral.cpp:427
GaudiMath::Integration::Finite
Definition: Integration.h:30
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_category
GaudiMath::Integration::Category m_category
Definition: NumericalDefiniteIntegral.h:398
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_epsrel
double m_epsrel
Definition: NumericalDefiniteIntegral.h:405
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_size
size_t m_size
Definition: NumericalDefiniteIntegral.h:410
GaudiMath::Integration::Fixed
Definition: Integration.h:34
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_b
double m_b
Definition: NumericalDefiniteIntegral.h:393
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_DIM
size_t m_DIM
Definition: NumericalDefiniteIntegral.h:389
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_index
size_t m_index
Definition: NumericalDefiniteIntegral.h:390
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::epsabs
double epsabs() const
absolute precision
Definition: NumericalDefiniteIntegral.h:326
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_rule
GaudiMath::Integration::KronrodRule m_rule
Definition: NumericalDefiniteIntegral.h:399
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_ia
bool m_ia
Definition: NumericalDefiniteIntegral.h:394
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_result
double m_result
Definition: NumericalDefiniteIntegral.h:407
GaudiMath::Integration::Default
Definition: Integration.h:41
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::epsrel
double epsrel() const
relatiove precision
Definition: NumericalDefiniteIntegral.h:328
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_a
double m_a
Definition: NumericalDefiniteIntegral.h:392
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_type
GaudiMath::Integration::Type m_type
Definition: NumericalDefiniteIntegral.h:397
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::type
GaudiMath::Integration::Type type() const
integration type
Definition: NumericalDefiniteIntegral.h:340
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_function
std::unique_ptr< const AbsFunction > m_function
Definition: NumericalDefiniteIntegral.h:388
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_argF
Argument m_argF
Definition: NumericalDefiniteIntegral.h:414
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_ib
bool m_ib
Definition: NumericalDefiniteIntegral.h:395
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::b
double b() const
Definition: NumericalDefiniteIntegral.h:322
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_argument
Argument m_argument
Definition: NumericalDefiniteIntegral.h:413
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::rule
GaudiMath::Integration::KronrodRule rule() const
integration rule
Definition: NumericalDefiniteIntegral.h:346
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::a
double a() const
integration limit
Definition: NumericalDefiniteIntegral.h:321

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 156 of file NumericalDefiniteIntegral.cpp.

164 : m_function ( function.clone() )
165 , m_DIM ( 0 )
166 , m_index ( index )
167 , m_a ( a )
168 , m_b ( b )
169 , m_ia ( false )
170 , m_ib ( false )
171 , m_type ( GaudiMath::Integration:: Other )
172 , m_category ( GaudiMath::Integration:: Singular )
173 , m_rule ( GaudiMath::Integration:: Fixed )
174 , m_points ( points )
175 , m_epsabs ( epsabs )
176 , m_epsrel ( epsrel )
177 //
178 , m_result ( GSL_NEGINF )
179 , m_error ( GSL_POSINF )
180 //
181 , m_size ( size )
182 {
183 if ( function.dimensionality() < 2 )
184 { Exception("::constructor: invalid dimensionality ") ; }
185 if ( m_index >= function.dimensionality() )
186 { Exception("::constructor: invalid variable index") ; }
187
188 m_DIM = function.dimensionality() - 1 ;
189 m_argument = Argument( m_DIM ) ;
190 m_argF = Argument( m_DIM + 1 ) ;
191
192 const double l1 = std::min ( a , b ) ;
193 const double l2 = std::max ( a , b ) ;
194 m_points.push_back ( l1 ) ;
195 m_points.push_back ( l2 ) ;
196 // TODO: replace by remove_if (<l1,>l2), unique, erase and sort...
197 std::sort ( m_points.begin() , m_points.end() ) ;
198 m_points.erase( std::unique( m_points.begin () , m_points.end () ) ,
199 m_points.end() );
200
201 auto lower = std::lower_bound ( m_points.begin () , m_points.end () , l1 ) ;
202 m_points.erase( m_points.begin () , lower ) ;
203 auto upper = std::upper_bound ( m_points.begin () , m_points.end () , l2 ) ;
204 m_points.erase( upper , m_points.end () ) ;
205
206 m_pdata.reset( new double[ m_points.size() ] );
207 std::copy( m_points.begin() , m_points.end() , m_pdata.get() );
208 }
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_epsabs
double m_epsabs
Definition: NumericalDefiniteIntegral.h:404
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::size
size_t size() const
Definition: NumericalDefiniteIntegral.h:336
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::dimensionality
virtual unsigned int dimensionality() const
dimensionality of the problem
Definition: NumericalDefiniteIntegral.h:303
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_error
double m_error
Definition: NumericalDefiniteIntegral.h:408
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::Exception
StatusCode Exception(const std::string &message, const StatusCode &sc=StatusCode::FAILURE) const
Definition: NumericalDefiniteIntegral.cpp:427
std::copy
T copy(T...args)
GaudiMath::Integration::Other
Definition: Integration.h:28
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_category
GaudiMath::Integration::Category m_category
Definition: NumericalDefiniteIntegral.h:398
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_epsrel
double m_epsrel
Definition: NumericalDefiniteIntegral.h:405
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_size
size_t m_size
Definition: NumericalDefiniteIntegral.h:410
GaudiMath::Integration::Fixed
Definition: Integration.h:34
std::upper_bound
T upper_bound(T...args)
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_b
double m_b
Definition: NumericalDefiniteIntegral.h:393
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_DIM
size_t m_DIM
Definition: NumericalDefiniteIntegral.h:389
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::m_index
size_t m_index
Definition: NumericalDefiniteIntegral.h:390
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::epsabs
double epsabs() const
absolute precision
Definition: NumericalDefiniteIntegral.h:326
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_points
Points m_points
Definition: NumericalDefiniteIntegral.h:401
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_rule
GaudiMath::Integration::KronrodRule m_rule
Definition: NumericalDefiniteIntegral.h:399
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_ia
bool m_ia
Definition: NumericalDefiniteIntegral.h:394
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_result
double m_result
Definition: NumericalDefiniteIntegral.h:407
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:402
std::max
T max(T...args)
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::epsrel
double epsrel() const
relatiove precision
Definition: NumericalDefiniteIntegral.h:328
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_a
double m_a
Definition: NumericalDefiniteIntegral.h:392
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_type
GaudiMath::Integration::Type m_type
Definition: NumericalDefiniteIntegral.h:397
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:388
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::points
const Points & points() const
known singularities
Definition: NumericalDefiniteIntegral.h:324
std::vector::begin
T begin(T...args)
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_argF
Argument m_argF
Definition: NumericalDefiniteIntegral.h:414
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_ib
bool m_ib
Definition: NumericalDefiniteIntegral.h:395
std::sort
T sort(T...args)
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::b
double b() const
Definition: NumericalDefiniteIntegral.h:322
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_argument
Argument m_argument
Definition: NumericalDefiniteIntegral.h:413
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::a
double a() const
integration limit
Definition: NumericalDefiniteIntegral.h:321

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 236 of file NumericalDefiniteIntegral.cpp.

243 : m_function ( function.clone() )
244 , m_DIM ( 0 )
245 , m_index ( index )
246 , m_a ( a )
247 , m_b ( GSL_POSINF )
248 , m_ia ( false )
249 , m_ib ( true )
250 , m_type ( GaudiMath::Integration:: Other )
251 , m_category ( GaudiMath::Integration:: Infinite )
252 , m_rule ( GaudiMath::Integration:: Fixed )
253 , m_epsabs ( epsabs )
254 , m_epsrel ( epsrel )
255 //
256 , m_result ( GSL_NEGINF )
257 , m_error ( GSL_POSINF )
258 //
259 , m_size ( size )
260 {
261 if ( function.dimensionality() < 2 )
262 { Exception("::constructor: invalid dimensionality ") ; }
263 if ( m_index >= function.dimensionality() )
264 { Exception("::constructor: invalid variable index") ; }
265
266 m_DIM = function.dimensionality() - 1 ;
267 m_argument = Argument( m_DIM ) ;
268 m_argF = Argument( m_DIM + 1 ) ;
269
270 }
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_epsabs
double m_epsabs
Definition: NumericalDefiniteIntegral.h:404
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::size
size_t size() const
Definition: NumericalDefiniteIntegral.h:336
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::dimensionality
virtual unsigned int dimensionality() const
dimensionality of the problem
Definition: NumericalDefiniteIntegral.h:303
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_error
double m_error
Definition: NumericalDefiniteIntegral.h:408
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::Exception
StatusCode Exception(const std::string &message, const StatusCode &sc=StatusCode::FAILURE) const
Definition: NumericalDefiniteIntegral.cpp:427
GaudiMath::Integration::Other
Definition: Integration.h:28
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_category
GaudiMath::Integration::Category m_category
Definition: NumericalDefiniteIntegral.h:398
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_epsrel
double m_epsrel
Definition: NumericalDefiniteIntegral.h:405
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_size
size_t m_size
Definition: NumericalDefiniteIntegral.h:410
GaudiMath::Integration::Fixed
Definition: Integration.h:34
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_b
double m_b
Definition: NumericalDefiniteIntegral.h:393
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_DIM
size_t m_DIM
Definition: NumericalDefiniteIntegral.h:389
GaudiMath::Integration::Infinite
Definition: Integration.h:32
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_index
size_t m_index
Definition: NumericalDefiniteIntegral.h:390
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::epsabs
double epsabs() const
absolute precision
Definition: NumericalDefiniteIntegral.h:326
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_rule
GaudiMath::Integration::KronrodRule m_rule
Definition: NumericalDefiniteIntegral.h:399
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_ia
bool m_ia
Definition: NumericalDefiniteIntegral.h:394
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_result
double m_result
Definition: NumericalDefiniteIntegral.h:407
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::epsrel
double epsrel() const
relatiove precision
Definition: NumericalDefiniteIntegral.h:328
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_a
double m_a
Definition: NumericalDefiniteIntegral.h:392
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_type
GaudiMath::Integration::Type m_type
Definition: NumericalDefiniteIntegral.h:397
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_function
std::unique_ptr< const AbsFunction > m_function
Definition: NumericalDefiniteIntegral.h:388
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_argF
Argument m_argF
Definition: NumericalDefiniteIntegral.h:414
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_ib
bool m_ib
Definition: NumericalDefiniteIntegral.h:395
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_argument
Argument m_argument
Definition: NumericalDefiniteIntegral.h:413
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::a
double a() const
integration limit
Definition: NumericalDefiniteIntegral.h:321

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 299 of file NumericalDefiniteIntegral.cpp.

306 : m_function ( function.clone() )
307 , m_DIM ( 0 )
308 , m_index ( index )
309 , m_a ( GSL_NEGINF )
310 , m_b ( b )
311 , m_ia ( true )
312 , m_ib ( false )
313 , m_type ( GaudiMath::Integration:: Other )
314 , m_category ( GaudiMath::Integration:: Infinite )
315 , m_rule ( GaudiMath::Integration:: Fixed )
316 , m_epsabs ( epsabs )
317 , m_epsrel ( epsrel )
318 //
319 , m_result ( GSL_NEGINF )
320 , m_error ( GSL_POSINF )
321 //
322 , m_size ( size )
323 {
324 if ( function.dimensionality() < 2 )
325 { Exception("::constructor: invalid dimensionality ") ; }
326 if ( m_index >= function.dimensionality() )
327 { Exception("::constructor: invalid variable index") ; }
328
329 m_DIM = function.dimensionality() - 1 ;
330 m_argument = Argument( m_DIM ) ;
331 m_argF = Argument( m_DIM + 1 ) ;
332 }
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_epsabs
double m_epsabs
Definition: NumericalDefiniteIntegral.h:404
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::size
size_t size() const
Definition: NumericalDefiniteIntegral.h:336
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::dimensionality
virtual unsigned int dimensionality() const
dimensionality of the problem
Definition: NumericalDefiniteIntegral.h:303
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_error
double m_error
Definition: NumericalDefiniteIntegral.h:408
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::Exception
StatusCode Exception(const std::string &message, const StatusCode &sc=StatusCode::FAILURE) const
Definition: NumericalDefiniteIntegral.cpp:427
GaudiMath::Integration::Other
Definition: Integration.h:28
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_category
GaudiMath::Integration::Category m_category
Definition: NumericalDefiniteIntegral.h:398
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_epsrel
double m_epsrel
Definition: NumericalDefiniteIntegral.h:405
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_size
size_t m_size
Definition: NumericalDefiniteIntegral.h:410
GaudiMath::Integration::Fixed
Definition: Integration.h:34
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_b
double m_b
Definition: NumericalDefiniteIntegral.h:393
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_DIM
size_t m_DIM
Definition: NumericalDefiniteIntegral.h:389
GaudiMath::Integration::Infinite
Definition: Integration.h:32
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_index
size_t m_index
Definition: NumericalDefiniteIntegral.h:390
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::epsabs
double epsabs() const
absolute precision
Definition: NumericalDefiniteIntegral.h:326
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_rule
GaudiMath::Integration::KronrodRule m_rule
Definition: NumericalDefiniteIntegral.h:399
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_ia
bool m_ia
Definition: NumericalDefiniteIntegral.h:394
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_result
double m_result
Definition: NumericalDefiniteIntegral.h:407
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::epsrel
double epsrel() const
relatiove precision
Definition: NumericalDefiniteIntegral.h:328
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_a
double m_a
Definition: NumericalDefiniteIntegral.h:392
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_type
GaudiMath::Integration::Type m_type
Definition: NumericalDefiniteIntegral.h:397
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_function
std::unique_ptr< const AbsFunction > m_function
Definition: NumericalDefiniteIntegral.h:388
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_argF
Argument m_argF
Definition: NumericalDefiniteIntegral.h:414
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_ib
bool m_ib
Definition: NumericalDefiniteIntegral.h:395
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::b
double b() const
Definition: NumericalDefiniteIntegral.h:322
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_argument
Argument m_argument
Definition: NumericalDefiniteIntegral.h:413

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 358 of file NumericalDefiniteIntegral.cpp.

363 : AbsFunction()
364 , m_function ( function.clone() )
365 , m_DIM ( 0 )
366 , m_index ( index )
367 , m_a ( GSL_NEGINF )
368 , m_b ( GSL_POSINF )
369 , m_ia ( true )
370 , m_ib ( true )
371 , m_type ( GaudiMath::Integration:: Other )
372 , m_category ( GaudiMath::Integration:: Infinite )
373 , m_rule ( GaudiMath::Integration:: Fixed )
374 , m_epsabs ( epsabs )
375 , m_epsrel ( epsrel )
376 //
377 , m_result ( GSL_NEGINF )
378 , m_error ( GSL_POSINF )
379 //
380 , m_size ( size )
381 {
382 if ( function.dimensionality() < 2 )
383 { Exception("::constructor: invalid dimensionality ") ; }
384 if ( m_index >= function.dimensionality() )
385 { Exception("::constructor: invalid variable index") ; }
386
387 m_DIM = function.dimensionality() - 1 ;
388 m_argument = Argument( m_DIM ) ;
389 m_argF = Argument( m_DIM + 1 ) ;
390
391 }
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_epsabs
double m_epsabs
Definition: NumericalDefiniteIntegral.h:404
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::size
size_t size() const
Definition: NumericalDefiniteIntegral.h:336
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::dimensionality
virtual unsigned int dimensionality() const
dimensionality of the problem
Definition: NumericalDefiniteIntegral.h:303
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_error
double m_error
Definition: NumericalDefiniteIntegral.h:408
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::Exception
StatusCode Exception(const std::string &message, const StatusCode &sc=StatusCode::FAILURE) const
Definition: NumericalDefiniteIntegral.cpp:427
GaudiMath::Integration::Other
Definition: Integration.h:28
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_category
GaudiMath::Integration::Category m_category
Definition: NumericalDefiniteIntegral.h:398
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_epsrel
double m_epsrel
Definition: NumericalDefiniteIntegral.h:405
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_size
size_t m_size
Definition: NumericalDefiniteIntegral.h:410
GaudiMath::Integration::Fixed
Definition: Integration.h:34
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_b
double m_b
Definition: NumericalDefiniteIntegral.h:393
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_DIM
size_t m_DIM
Definition: NumericalDefiniteIntegral.h:389
GaudiMath::Integration::Infinite
Definition: Integration.h:32
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_index
size_t m_index
Definition: NumericalDefiniteIntegral.h:390
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::epsabs
double epsabs() const
absolute precision
Definition: NumericalDefiniteIntegral.h:326
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_rule
GaudiMath::Integration::KronrodRule m_rule
Definition: NumericalDefiniteIntegral.h:399
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_ia
bool m_ia
Definition: NumericalDefiniteIntegral.h:394
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_result
double m_result
Definition: NumericalDefiniteIntegral.h:407
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::epsrel
double epsrel() const
relatiove precision
Definition: NumericalDefiniteIntegral.h:328
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_a
double m_a
Definition: NumericalDefiniteIntegral.h:392
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_type
GaudiMath::Integration::Type m_type
Definition: NumericalDefiniteIntegral.h:397
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_function
std::unique_ptr< const AbsFunction > m_function
Definition: NumericalDefiniteIntegral.h:388
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_argF
Argument m_argF
Definition: NumericalDefiniteIntegral.h:414
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_ib
bool m_ib
Definition: NumericalDefiniteIntegral.h:395
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_argument
Argument m_argument
Definition: NumericalDefiniteIntegral.h:413

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

copy constructor

Definition at line 395 of file NumericalDefiniteIntegral.cpp.

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

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

destructor

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

## Member Function Documentation

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

integration limit

Definition at line 321 of file NumericalDefiniteIntegral.h.

321 { return m_a ; }
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_a
double m_a
Definition: NumericalDefiniteIntegral.h:392

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

allocate the integration workspace

Definition at line 533 of file NumericalDefiniteIntegral.cpp.

534 {
535 if ( !m_ws ) {
536 m_ws.reset( new _Workspace() );
537 m_ws->ws = gsl_integration_workspace_alloc( size () );
538 if ( !m_ws->ws ) { Exception ( "allocate()::invalid workspace" ) ; };
539 }
540 return m_ws.get() ;
541 }
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::size
size_t size() const
Definition: NumericalDefiniteIntegral.h:336
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::Exception
StatusCode Exception(const std::string &message, const StatusCode &sc=StatusCode::FAILURE) const
Definition: NumericalDefiniteIntegral.cpp:427
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_ws
std::unique_ptr< _Workspace, gsl_ws_deleter > m_ws
Definition: NumericalDefiniteIntegral.h:411

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

Definition at line 322 of file NumericalDefiniteIntegral.h.

322 { return m_b ; }
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_b
double m_b
Definition: NumericalDefiniteIntegral.h:393

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

integration category

Definition at line 343 of file NumericalDefiniteIntegral.h.

343 { return m_category ; }
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_category
GaudiMath::Integration::Category m_category
Definition: NumericalDefiniteIntegral.h:398

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

dimensionality of the problem

Definition at line 303 of file NumericalDefiniteIntegral.h.

303 { return m_DIM ; }
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_DIM
size_t m_DIM
Definition: NumericalDefiniteIntegral.h:389

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

absolute precision

Definition at line 326 of file NumericalDefiniteIntegral.h.

326 { return m_epsabs ; }
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_epsabs
double m_epsabs
Definition: NumericalDefiniteIntegral.h:404

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

relatiove precision

Definition at line 328 of file NumericalDefiniteIntegral.h.

328 { return m_epsrel ; }
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_epsrel
double m_epsrel
Definition: NumericalDefiniteIntegral.h:405

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

evaluate of previous error

Definition at line 333 of file NumericalDefiniteIntegral.h.

333 { return m_error ; }
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_error
double m_error
Definition: NumericalDefiniteIntegral.h:408

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

Definition at line 427 of file NumericalDefiniteIntegral.cpp.

429 {
430 throw GaudiException( "NumericalDefiniteIntegral::" + message ,
431 "*GaudiMath*" , sc ) ;
432 return sc ;
433 }
GaudiException
Define general base for Gaudi exception.
Definition: GaudiException.h:23
merge_files.sc
int sc
Definition: merge_files.py:167

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

accessor to the function itself

Definition at line 319 of file NumericalDefiniteIntegral.h.

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

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

Does this function have an analytic derivative?

Definition at line 311 of file NumericalDefiniteIntegral.h.

311 { return true ;}

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

Function value.

evaluate the function

Definition at line 440 of file NumericalDefiniteIntegral.cpp.

441 {
442 // reset the result and the error
443 m_result = GSL_NEGINF ;
444 m_error = GSL_POSINF ;
445
446 // check the argument
447 if( 1 != m_DIM ) { Exception ( "operator(): invalid argument size " ) ; };
448
449 m_argument[0] = argument ;
450 return (*this) ( m_argument );
451 }
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_error
double m_error
Definition: NumericalDefiniteIntegral.h:408
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::Exception
StatusCode Exception(const std::string &message, const StatusCode &sc=StatusCode::FAILURE) const
Definition: NumericalDefiniteIntegral.cpp:427
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_DIM
size_t m_DIM
Definition: NumericalDefiniteIntegral.h:389
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_result
double m_result
Definition: NumericalDefiniteIntegral.h:407
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_argument
Argument m_argument
Definition: NumericalDefiniteIntegral.h:413

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

Function value.

evaluate the function

Definition at line 473 of file NumericalDefiniteIntegral.cpp.

474 {
475 // reset the result and the error
476 m_result = GSL_NEGINF ;
477 m_error = GSL_POSINF ;
478
479 // check the argument
480 if( argument.dimension() != m_DIM )
481 { Exception ( "operator(): invalid argument size " ) ; };
482
483 // copy the argument
484
485 for( size_t i = 0 ; i < m_DIM ; ++i )
486 {
487 m_argument [i] = argument [i] ;
488 const size_t j = i < m_index ? i : i + 1 ;
489 m_argF [j] = argument [i] ;
490 };
491
492 // create the helper object
493 GSL_Helper helper( *m_function , m_argF , m_index );
494
495 // use GSL to evaluate the numerical derivative
496 gsl_function F ;
497 F.function = &GSL_Adaptor ;
498 F.params = &helper ;
499 _Function F1 ;
500 F1.fn = &F ;
501
502 if ( GaudiMath::Integration::Infinite == category () )
503 { return QAGI ( &F1 ) ; } // RETURN
504
505 if ( m_a == m_b )
506 {
507 m_result = 0 ; m_error = 0 ; // EXACT
508 return m_result ; // RETURN
509 }
510
511 if ( GaudiMath::Integration::Singular == category () )
512 { return QAGP ( &F1 ) ; } // RETURN
513 else if ( GaudiMath::Integration::Finite == category () )
514 if ( GaudiMath::Integration::NonAdaptive == type () )
515 { return QNG ( &F1 ) ; } // RETURN
516 else if ( GaudiMath::Integration::Adaptive == type () )
517 { return QAG ( &F1 ) ; } // RETURN
518 else if ( GaudiMath::Integration::AdaptiveSingular == type () )
519 { return QAGS ( &F1 ) ; } // RETURN
520 else
521 { Exception ( "::operator(): invalid type " ); }
522 else
523 { Exception ( "::operator(): invalid category " ); }
524
525 return 0 ;
526 }
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::category
GaudiMath::Integration::Category category() const
integration category
Definition: NumericalDefiniteIntegral.h:343
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_error
double m_error
Definition: NumericalDefiniteIntegral.h:408
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::Exception
StatusCode Exception(const std::string &message, const StatusCode &sc=StatusCode::FAILURE) const
Definition: NumericalDefiniteIntegral.cpp:427
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:393
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_DIM
size_t m_DIM
Definition: NumericalDefiniteIntegral.h:389
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:390
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_result
double m_result
Definition: NumericalDefiniteIntegral.h:407
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::QAG
double QAG(_Function *fun) const
Definition: NumericalDefiniteIntegral.cpp:650
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:392
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::type
GaudiMath::Integration::Type type() const
integration type
Definition: NumericalDefiniteIntegral.h:340
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_function
std::unique_ptr< const AbsFunction > m_function
Definition: NumericalDefiniteIntegral.h:388
GaudiMath::Integration::AdaptiveSingular
Definition: Integration.h:27
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::QAGP
double QAGP(_Function *fun) const
Definition: NumericalDefiniteIntegral.cpp:591
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_argF
Argument m_argF
Definition: NumericalDefiniteIntegral.h:414
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::QNG
double QNG(_Function *fun) const
Definition: NumericalDefiniteIntegral.cpp:621
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::QAGI
double QAGI(_Function *fun) const
Definition: NumericalDefiniteIntegral.cpp:547
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_argument
Argument m_argument
Definition: NumericalDefiniteIntegral.h:413
ana.i
list i
Definition: ana.py:128
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::QAGS
double QAGS(_Function *fun) const
Definition: NumericalDefiniteIntegral.cpp:681

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

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

Derivatives.

Definition at line 458 of file NumericalDefiniteIntegral.cpp.

459 {
460 if ( idx >= m_DIM )
461 { Exception ( "::partial(i): invalid variable index " ) ; };
462 //
463 const AbsFunction& aux = NumericalDerivative( *this , idx ) ;
464 return Genfun::FunctionNoop( &aux ) ;
465 }
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::Exception
StatusCode Exception(const std::string &message, const StatusCode &sc=StatusCode::FAILURE) const
Definition: NumericalDefiniteIntegral.cpp:427
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_DIM
size_t m_DIM
Definition: NumericalDefiniteIntegral.h:389

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

known singularities

Definition at line 324 of file NumericalDefiniteIntegral.h.

324 { return m_points ; }
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_points
Points m_points
Definition: NumericalDefiniteIntegral.h:401

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

Definition at line 650 of file NumericalDefiniteIntegral.cpp.

651 {
652 if( !F ) { Exception("QAG::invalid function") ; }
653
654 // allocate workspace
655 allocate () ;
656
657 // integration limits
658 const double low = std::min ( m_a , m_b ) ;
659 const double high = std::max ( m_a , m_b ) ;
660
661 int ierror =
662 gsl_integration_qag ( F->fn ,
663 low , high ,
664 m_epsabs , m_epsrel ,
665 size () , (int) rule() , ws ()->ws ,
666 &m_result , &m_error );
667
668 if( ierror ) { gsl_error( "NumericalDefiniteIntegral::QAG " ,
669 __FILE__ , __LINE__ , ierror ) ; }
670
671 // sign
672 if ( m_a > m_b ) { m_result *= -1 ; }
673
674 return m_result ;
675 }
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_epsabs
double m_epsabs
Definition: NumericalDefiniteIntegral.h:404
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::size
size_t size() const
Definition: NumericalDefiniteIntegral.h:336
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_error
double m_error
Definition: NumericalDefiniteIntegral.h:408
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::Exception
StatusCode Exception(const std::string &message, const StatusCode &sc=StatusCode::FAILURE) const
Definition: NumericalDefiniteIntegral.cpp:427
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::ws
_Workspace * ws() const
Definition: NumericalDefiniteIntegral.h:364
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_epsrel
double m_epsrel
Definition: NumericalDefiniteIntegral.h:405
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_b
double m_b
Definition: NumericalDefiniteIntegral.h:393
std::min
T min(T...args)
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_result
double m_result
Definition: NumericalDefiniteIntegral.h:407
std::max
T max(T...args)
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_a
double m_a
Definition: NumericalDefiniteIntegral.h:392
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::allocate
_Workspace * allocate() const
allocate the integration workspace
Definition: NumericalDefiniteIntegral.cpp:533
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::rule
GaudiMath::Integration::KronrodRule rule() const
integration rule
Definition: NumericalDefiniteIntegral.h:346

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

Definition at line 547 of file NumericalDefiniteIntegral.cpp.

548 {
549 // check the argument
550 if ( !F ) { Exception("::QAGI: invalid function"); }
551
552 // allocate workspace
553 allocate() ;
554
555 int ierror = 0 ;
556
557 if ( m_ia && m_ib )
558 {
559 ierror = gsl_integration_qagi ( F->fn ,
560 m_epsabs , m_epsrel ,
561 size () , ws()->ws ,
562 &m_result , &m_error ) ;
563 }
564 else if ( m_ia )
565 {
566 ierror = gsl_integration_qagil ( F->fn , m_b ,
567 m_epsabs , m_epsrel ,
568 size () , ws()->ws ,
569 &m_result , &m_error ) ;
570 }
571 else if ( m_ib )
572 {
573 ierror = gsl_integration_qagiu ( F->fn , m_a ,
574 m_epsabs , m_epsrel ,
575 size () , ws()->ws ,
576 &m_result , &m_error ) ;
577 }
578 else
579 { Exception ( "::QAGI: invalid mode" ) ; };
580
581 if( ierror ) { gsl_error( "NumericalDefiniteIntegral::QAGI" ,
582 __FILE__ , __LINE__ , ierror ) ;}
583
584 return m_result ;
585 }
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_epsabs
double m_epsabs
Definition: NumericalDefiniteIntegral.h:404
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::size
size_t size() const
Definition: NumericalDefiniteIntegral.h:336
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_error
double m_error
Definition: NumericalDefiniteIntegral.h:408
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::Exception
StatusCode Exception(const std::string &message, const StatusCode &sc=StatusCode::FAILURE) const
Definition: NumericalDefiniteIntegral.cpp:427
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::ws
_Workspace * ws() const
Definition: NumericalDefiniteIntegral.h:364
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_epsrel
double m_epsrel
Definition: NumericalDefiniteIntegral.h:405
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_b
double m_b
Definition: NumericalDefiniteIntegral.h:393
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_ia
bool m_ia
Definition: NumericalDefiniteIntegral.h:394
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_result
double m_result
Definition: NumericalDefiniteIntegral.h:407
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_a
double m_a
Definition: NumericalDefiniteIntegral.h:392
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::allocate
_Workspace * allocate() const
allocate the integration workspace
Definition: NumericalDefiniteIntegral.cpp:533
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_ib
bool m_ib
Definition: NumericalDefiniteIntegral.h:395

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

Definition at line 591 of file NumericalDefiniteIntegral.cpp.

592 {
593 if( !F ) { Exception("QAGP::invalid function") ; }
594
595 // no known singular points ?
596 if( points().empty() || !m_pdata ) { return QAGS( F ) ; }
597
598 const size_t npts = points().size();
599
600 // use GSL
601 int ierror =
602 gsl_integration_qagp ( F->fn ,
603 m_pdata.get() , npts ,
604 m_epsabs , m_epsrel ,
605 size () , ws()->ws ,
606 &m_result , &m_error ) ;
607
608 if( ierror ) { gsl_error( "NumericalDefiniteIntegral::QAGI " ,
609 __FILE__ , __LINE__ , ierror ) ; }
610
611 // the sign
612 if ( m_a > m_b ) { m_result *= -1 ; }
613
614 return m_result ;
615 }
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_epsabs
double m_epsabs
Definition: NumericalDefiniteIntegral.h:404
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::size
size_t size() const
Definition: NumericalDefiniteIntegral.h:336
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_error
double m_error
Definition: NumericalDefiniteIntegral.h:408
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::Exception
StatusCode Exception(const std::string &message, const StatusCode &sc=StatusCode::FAILURE) const
Definition: NumericalDefiniteIntegral.cpp:427
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::ws
_Workspace * ws() const
Definition: NumericalDefiniteIntegral.h:364
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::_Workspace::ws
gsl_integration_workspace * ws
Definition: NumericalDefiniteIntegral.h:74
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_epsrel
double m_epsrel
Definition: NumericalDefiniteIntegral.h:405
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_b
double m_b
Definition: NumericalDefiniteIntegral.h:393
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_result
double m_result
Definition: NumericalDefiniteIntegral.h:407
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_pdata
std::unique_ptr< double[]> m_pdata
Definition: NumericalDefiniteIntegral.h:402
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_a
double m_a
Definition: NumericalDefiniteIntegral.h:392
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:324
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::QAGS
double QAGS(_Function *fun) const
Definition: NumericalDefiniteIntegral.cpp:681

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

Definition at line 681 of file NumericalDefiniteIntegral.cpp.

682 {
683 if( !F ) { Exception("QAG::invalid function") ; }
684
685 if ( m_a == m_b )
686 {
687 m_result = 0 ;
688 m_error = 0 ; // EXACT !
689 return m_result ;
690 }
691
692 // allocate workspace
693 allocate () ;
694
695 // integration limits
696 const double low = std::min ( m_a , m_b ) ;
697 const double high = std::max ( m_a , m_b ) ;
698
699 int ierror =
700 gsl_integration_qags ( F->fn ,
701 low , high ,
702 m_epsabs , m_epsrel ,
703 size () , ws()->ws ,
704 &m_result , &m_error );
705
706 if( ierror ) { gsl_error( "NumericalDefiniteIntegral::QAGS " ,
707 __FILE__ , __LINE__ , ierror ) ; }
708
709 // sign
710 if ( m_a > m_b ) { m_result *= -1 ; }
711
712 return m_result ;
713 }
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_epsabs
double m_epsabs
Definition: NumericalDefiniteIntegral.h:404
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::size
size_t size() const
Definition: NumericalDefiniteIntegral.h:336
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_error
double m_error
Definition: NumericalDefiniteIntegral.h:408
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::Exception
StatusCode Exception(const std::string &message, const StatusCode &sc=StatusCode::FAILURE) const
Definition: NumericalDefiniteIntegral.cpp:427
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::ws
_Workspace * ws() const
Definition: NumericalDefiniteIntegral.h:364
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_epsrel
double m_epsrel
Definition: NumericalDefiniteIntegral.h:405
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_b
double m_b
Definition: NumericalDefiniteIntegral.h:393
std::min
T min(T...args)
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_result
double m_result
Definition: NumericalDefiniteIntegral.h:407
std::max
T max(T...args)
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_a
double m_a
Definition: NumericalDefiniteIntegral.h:392
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::allocate
_Workspace * allocate() const
allocate the integration workspace
Definition: NumericalDefiniteIntegral.cpp:533

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

Definition at line 621 of file NumericalDefiniteIntegral.cpp.

622 {
623 if( !F ) { Exception("QNG::invalid function") ; }
624
625 // integration limits
626 const double low = std::min ( m_a , m_b ) ;
627 const double high = std::max ( m_a , m_b ) ;
628
629 size_t neval = 0 ;
630 int ierror =
631 gsl_integration_qng ( F->fn ,
632 low , high ,
633 m_epsabs , m_epsrel ,
634 &m_result , &m_error , &neval ) ;
635
636 if( ierror ) { gsl_error( "NumericalIndefiniteIntegral::QNG " ,
637 __FILE__ , __LINE__ , ierror ) ; }
638
639 // sign
640 if ( m_a > m_b ) { m_result *= -1 ; }
641
642 return m_result ;
643 }
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_epsabs
double m_epsabs
Definition: NumericalDefiniteIntegral.h:404
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_error
double m_error
Definition: NumericalDefiniteIntegral.h:408
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::Exception
StatusCode Exception(const std::string &message, const StatusCode &sc=StatusCode::FAILURE) const
Definition: NumericalDefiniteIntegral.cpp:427
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_epsrel
double m_epsrel
Definition: NumericalDefiniteIntegral.h:405
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_b
double m_b
Definition: NumericalDefiniteIntegral.h:393
std::min
T min(T...args)
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_result
double m_result
Definition: NumericalDefiniteIntegral.h:407
std::max
T max(T...args)
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_a
double m_a
Definition: NumericalDefiniteIntegral.h:392

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

previous result

Definition at line 331 of file NumericalDefiniteIntegral.h.

331 { return m_result ; }
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_result
double m_result
Definition: NumericalDefiniteIntegral.h:407

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

integration rule

Definition at line 346 of file NumericalDefiniteIntegral.h.

346 { return m_rule ; }
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_rule
GaudiMath::Integration::KronrodRule m_rule
Definition: NumericalDefiniteIntegral.h:399

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

Definition at line 336 of file NumericalDefiniteIntegral.h.

336 { return m_size ; }
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_size
size_t m_size
Definition: NumericalDefiniteIntegral.h:410

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

integration type

Definition at line 340 of file NumericalDefiniteIntegral.h.

340 { return m_type ; }
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral::m_type
GaudiMath::Integration::Type m_type
Definition: NumericalDefiniteIntegral.h:397

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

Definition at line 364 of file NumericalDefiniteIntegral.h.

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

## Member Data Documentation

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

Definition at line 392 of file NumericalDefiniteIntegral.h.

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

Definition at line 414 of file NumericalDefiniteIntegral.h.

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

Definition at line 413 of file NumericalDefiniteIntegral.h.

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

Definition at line 393 of file NumericalDefiniteIntegral.h.

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

Definition at line 398 of file NumericalDefiniteIntegral.h.

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

Definition at line 389 of file NumericalDefiniteIntegral.h.

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

Definition at line 404 of file NumericalDefiniteIntegral.h.

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

Definition at line 405 of file NumericalDefiniteIntegral.h.

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

Definition at line 408 of file NumericalDefiniteIntegral.h.

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

Definition at line 388 of file NumericalDefiniteIntegral.h.

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

Definition at line 394 of file NumericalDefiniteIntegral.h.

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

Definition at line 395 of file NumericalDefiniteIntegral.h.

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

Definition at line 390 of file NumericalDefiniteIntegral.h.

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

Definition at line 402 of file NumericalDefiniteIntegral.h.

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

Definition at line 401 of file NumericalDefiniteIntegral.h.

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

Definition at line 407 of file NumericalDefiniteIntegral.h.

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

Definition at line 399 of file NumericalDefiniteIntegral.h.

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

Definition at line 410 of file NumericalDefiniteIntegral.h.

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

Definition at line 397 of file NumericalDefiniteIntegral.h.

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

Definition at line 411 of file NumericalDefiniteIntegral.h.

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

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