Gaudi Framework, version v25r2
Home
Generated: Wed Jun 4 2014
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
.cern.ch
sw
Gaudi
releases
GAUDI
GAUDI_v25r2
GaudiGSL
GaudiMath
NumericalIndefiniteIntegral.h
Go to the documentation of this file.
1
// $Id: NumericalIndefiniteIntegral.h,v 1.2 2008/10/27 19:22:20 marcocle Exp $
2
// ============================================================================
3
#ifndef GAUDIMATH_NUMERICALINDEFINITEINTEGRAL_H
4
#define GAUDIMATH_NUMERICALINDEFINITEINTEGRAL_H 1
5
// ============================================================================
6
// Include files
7
// ============================================================================
8
// STD & STL
9
// ============================================================================
10
#include <string>
11
// ============================================================================
12
// GaudiKernel
13
// ============================================================================
14
#include "
GaudiKernel/StatusCode.h
"
15
// ============================================================================
16
// GaudiMath
17
// ============================================================================
18
#include "
GaudiMath/Integration.h
"
19
// ============================================================================
20
// CLHEP
21
// ============================================================================
22
#include "CLHEP/GenericFunctions/AbsFunction.hh"
23
// ============================================================================
24
25
27
28
namespace
Genfun
29
{
30
namespace
GaudiMathImplementation
31
{
76
class
GAUDI_API
NumericalIndefiniteIntegral
:
public
AbsFunction
77
{
78
public
:
79
struct
_Workspace
;
80
struct
_Function
;
81
public
:
82
84
typedef
std::vector<double>
Points
;
85
86
public
:
87
89
FUNCTION_OBJECT_DEF(
NumericalIndefiniteIntegral
)
90
91
public:
92
156
NumericalIndefiniteIntegral
157
( const AbsFunction& function ,
158
const
size_t
index ,
159
const
double
a ,
160
const GaudiMath::
Integration
::
Limit
limit =
161
GaudiMath::
Integration
::
VariableHighLimit
,
162
const GaudiMath::
Integration
::
Type
type
=
163
GaudiMath::
Integration
::
Adaptive
,
164
const GaudiMath::
Integration
::
KronrodRule
rule =
165
GaudiMath::
Integration
::
Default
,
166
const
double
epsabs = 1e-10 ,
167
const
double
epsrel = 1.e-7 ,
168
const
size_t
size = 1000 );
169
211
NumericalIndefiniteIntegral
212
( const AbsFunction& function ,
213
const
size_t
index ,
214
const
double
a ,
215
const
Points
& points ,
216
const GaudiMath::
Integration
::
Limit
limit =
217
GaudiMath::
Integration
::VariableHighLimit ,
218
const
double
epsabs = 1e-9 ,
219
const
double
epsrel = 1.e-6 ,
220
const
size_t
size = 1000 ) ;
221
259
NumericalIndefiniteIntegral
260
( const AbsFunction& function ,
261
const
size_t
index ,
262
const GaudiMath::
Integration
::
Limit
limit =
263
GaudiMath::
Integration
::VariableHighLimit ,
264
const
double
epsabs = 1e-9 ,
265
const
double
epsrel = 1.e-6 ,
266
const
size_t
size = 1000 ) ;
267
269
NumericalIndefiniteIntegral
270
( const
NumericalIndefiniteIntegral
& ) ;
271
273
virtual ~NumericalIndefiniteIntegral() ;
274
275
public:
276
278
virtual
unsigned
int
dimensionality()
const
{
return
m_DIM ; }
279
281
virtual
double
operator() (
double
argument )
const
;
283
virtual
double
operator() (
const
Argument& argument )
const
;
284
286
virtual
bool
hasAnalyticDerivative
()
const
{
return
true ;}
287
289
virtual
Genfun::Derivative
partial (
unsigned
int
index )
const
;
290
291
public
:
292
294
const
AbsFunction&
function
()
const
{
return
*m_function ; }
296
double
a
()
const
{
return
m_a ; }
298
const
Points
&
points
()
const
{
return
m_points ; }
300
double
epsabs
()
const
{
return
m_epsabs ; }
302
double
epsrel
()
const
{
return
m_epsrel ; }
303
305
double
result
()
const
{
return
m_result ; }
307
double
error
()
const
{
return
m_error ; }
308
309
// maximal number of bisection integvals for adaptive algorithms
310
size_t
size
()
const
{
return
m_size ; }
311
313
GaudiMath::Integration::Limit
314
limit
()
const
{
return
m_limit ; }
316
GaudiMath::Integration::Type
317
type
()
const
{
return
m_type ; }
319
GaudiMath::Integration::Category
320
category
()
const
{
return
m_category ; }
322
GaudiMath::Integration::KronrodRule
323
rule
()
const
{
return
m_rule ; }
324
325
protected
:
326
327
// adaptive integration on infinite intervals
328
double
QAGI ( _Function* fun )
const
;
329
// adaptive integration with known singular points
330
double
QAGP ( _Function* fun )
const
;
331
// non-adaptive integration
332
double
QNG ( _Function* fun )
const
;
333
// adaptive integration
334
double
QAG ( _Function* fun )
const
;
335
// adaptive integral with singularities
336
double
QAGS ( _Function* fun )
const
;
337
338
// allocate the integration workspace
339
_Workspace* allocate ()
const
;
340
// the integration workspace
341
_Workspace
* ws ()
const
342
{
return
m_ws ; };
343
344
// throw the exception
345
StatusCode
Exception
346
(
const
std::string& message ,
347
const
StatusCode
&
sc
=
StatusCode::FAILURE
)
const
;
348
349
private
:
350
351
// default constructor is disabled
352
NumericalIndefiniteIntegral
() ;
353
// assignement operator is disabled
354
NumericalIndefiniteIntegral
&
operator
=
355
(
const
NumericalIndefiniteIntegral
& ) ;
356
357
private
:
358
359
const
AbsFunction*
m_function
;
360
size_t
m_DIM
;
361
size_t
m_index
;
362
363
double
m_a
;
364
365
GaudiMath::Integration::Limit
m_limit
;
366
GaudiMath::Integration::Type
m_type
;
367
GaudiMath::Integration::Category
m_category
;
368
GaudiMath::Integration::KronrodRule
m_rule
;
369
370
Points
m_points
;
371
double
*
m_pdata
;
372
373
double
m_epsabs
;
374
double
m_epsrel
;
375
376
mutable
double
m_result
;
377
mutable
double
m_error
;
378
379
size_t
m_size
;
380
mutable
_Workspace
*
m_ws
;
381
382
mutable
Argument
m_argument
;
383
384
};
385
386
}
// end of namespace GaudiMathImplementation
387
}
// end of namespace Genfun
388
389
// ============================================================================
390
// The END
391
// ============================================================================
392
#endif // GAUDIMATH_NUMERICALINDEFINITEINTEGRAL_H
393
// ============================================================================
Generated at Wed Jun 4 2014 14:48:56 for Gaudi Framework, version v25r2 by
Doxygen
version 1.8.2 written by
Dimitri van Heesch
, © 1997-2004