| The Gaudi Framework v29r1 (5cd95fa2)

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

- Namespace List
- Namespace Members

Namespaces | Typedefs | Functions
GaudiMath Namespace Reference

GaudiMath.h GaudiMath/GaudiMath.h. More...

## Namespaces
| Integration
| Interpolation

## Typedefs
typedef Genfun::GaudiMathImplementation::AdapterIFunction | AIDAFunction
typedef Genfun::GaudiMathImplementation::Adapter2DoubleFunction | Function2D
typedef Genfun::GaudiMathImplementation::Adapter3DoubleFunction | Function3D
typedef Genfun::GaudiMathImplementation::SimpleFunction | SimpleFunction
typedef Genfun::GaudiMathImplementation::GSLFunctionWithMode | GSLFunctionWithMode
typedef Genfun::GaudiMathImplementation::GSLFunctionWithError | GSLFunctionWithError
typedef Genfun::GaudiMathImplementation::GSLFunctionWithModeAndError | GSLFunctionWithModeAndError
typedef Genfun::AbsFunction | Function
typedef Genfun::GaudiMathImplementation::Constant | Constant
typedef Genfun::GaudiMathImplementation::NumericalDerivative | Derivative
typedef Genfun::GaudiMathImplementation::SimpleFunction | SimpleFun
typedef Genfun::GaudiMathImplementation::NumericalIndefiniteIntegral | IndIntegral
typedef Genfun::GaudiMathImplementation::NumericalDefiniteIntegral | DefIntegral
typedef Genfun::GaudiMathImplementation::SplineBase | SimpleSpline
typedef Genfun::GaudiMathImplementation::GSLSpline | Spline
typedef Genfun::GaudiMathImplementation::GSLSplineDeriv | SplineDeriv
typedef Genfun::GaudiMathImplementation::GSLSplineDeriv2 | SplineDeriv2
typedef Genfun::GaudiMathImplementation::GSLSplineInteg | SplineInteg

## Functions
GAUDI_API AIDAFunction | adapter (const AIDA::IFunction &function)
GAUDI_API Function2D | adapter (Function2D::Function function)
GAUDI_API Function3D | adapter (Function3D::Function function)
GAUDI_API SimpleFunction | adapter (SimpleFunction::Function1 function)
GAUDI_API SimpleFunction | adapter (const size_t dim, SimpleFunction::Function2 function)
GAUDI_API SimpleFunction | adapter (const size_t dim, SimpleFunction::Function3 function)
GAUDI_API GSLFunctionWithMode | adapter (GSLFunctionWithMode::Function function, const gsl_mode_t &mode)
GAUDI_API GSLFunctionWithError | adapter (GSLFunctionWithError::Function function)
GAUDI_API GSLFunctionWithModeAndError | adapter (GSLFunctionWithModeAndError::Function function, const gsl_mode_t &mode)
GAUDI_API double | Integral (const Genfun::AbsFunction &function, const double a, const double b, const GaudiMath::Integration::Type type=GaudiMath::Integration::Adaptive, const GaudiMath::Integration::KronrodRule rule=GaudiMath::Integration::Default, const double epsabs=1.e-10, const double epsrel=1.e-7, const size_t size=1000)
GAUDI_API double | Integral (const Genfun::AbsFunction &function, const double a, const double b, const std::vector< double > &points, const double epsabs=1e-9, const double epsrel=1.e-6, const size_t size=1000)
GAUDI_API double | Integral (const Genfun::AbsFunction &function, 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)
GAUDI_API double | Integral (const Genfun::AbsFunction &function, const GaudiMath::Integration::Inf a, const double b, const double epsabs=1e-9, const double epsrel=1.e-6, const size_t size=1000)
GAUDI_API double | Integral (const Genfun::AbsFunction &function, const GaudiMath::Integration::Inf a=GaudiMath::Integration::Infinity, const GaudiMath::Integration::Inf b=GaudiMath::Integration::Infinity, const double epsabs=1e-9, const double epsrel=1.e-6, const size_t size=1000)

## Detailed Description

GaudiMath.h GaudiMath/GaudiMath.h.

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

Date
  2003-08-31

## Typedef Documentation

typedef Genfun::GaudiMathImplementation::AdapterIFunction GaudiMath::AIDAFunction

Definition at line 15 of file Adapters.h.

typedef Genfun::GaudiMathImplementation::Constant GaudiMath::Constant

Definition at line 26 of file GaudiMath.h.

typedef Genfun::GaudiMathImplementation::NumericalDefiniteIntegral GaudiMath::DefIntegral

Definition at line 30 of file GaudiMath.h.

typedef Genfun::GaudiMathImplementation::NumericalDerivative GaudiMath::Derivative

Definition at line 27 of file GaudiMath.h.

typedef Genfun::AbsFunction GaudiMath::Function

Definition at line 24 of file GaudiMath.h.

typedef Genfun::GaudiMathImplementation::Adapter2DoubleFunction GaudiMath::Function2D

Definition at line 16 of file Adapters.h.

typedef Genfun::GaudiMathImplementation::Adapter3DoubleFunction GaudiMath::Function3D

Definition at line 17 of file Adapters.h.

typedef Genfun::GaudiMathImplementation::GSLFunctionWithError GaudiMath::GSLFunctionWithError

Definition at line 21 of file Adapters.h.

typedef Genfun::GaudiMathImplementation::GSLFunctionWithMode GaudiMath::GSLFunctionWithMode

Definition at line 20 of file Adapters.h.

typedef Genfun::GaudiMathImplementation::GSLFunctionWithModeAndError GaudiMath::GSLFunctionWithModeAndError

Definition at line 22 of file Adapters.h.

typedef Genfun::GaudiMathImplementation::NumericalIndefiniteIntegral GaudiMath::IndIntegral

Definition at line 29 of file GaudiMath.h.

typedef Genfun::GaudiMathImplementation::SimpleFunction GaudiMath::SimpleFun

Definition at line 28 of file GaudiMath.h.

typedef Genfun::GaudiMathImplementation::SimpleFunction GaudiMath::SimpleFunction

Definition at line 18 of file Adapters.h.

typedef Genfun::GaudiMathImplementation::SplineBase GaudiMath::SimpleSpline

Definition at line 32 of file GaudiMath.h.

typedef Genfun::GaudiMathImplementation::GSLSpline GaudiMath::Spline

Definition at line 33 of file GaudiMath.h.

typedef Genfun::GaudiMathImplementation::GSLSplineDeriv GaudiMath::SplineDeriv

Definition at line 34 of file GaudiMath.h.

typedef Genfun::GaudiMathImplementation::GSLSplineDeriv2 GaudiMath::SplineDeriv2

Definition at line 35 of file GaudiMath.h.

typedef Genfun::GaudiMathImplementation::GSLSplineInteg GaudiMath::SplineInteg

Definition at line 36 of file GaudiMath.h.

## Function Documentation

AIDAFunction GaudiMath::adapter | ( | const AIDA::IFunction & | function | ) |

Definition at line 25 of file Adapters.cpp.

25 { return AIDAFunction( function ); }
GaudiMath::AIDAFunction
Genfun::GaudiMathImplementation::AdapterIFunction AIDAFunction
Definition: Adapters.h:15

Function2D GaudiMath::adapter | ( | Function2D::Function | function | ) |

Definition at line 27 of file Adapters.cpp.

27 { return Function2D( function ); }
GaudiMath::Function2D
Genfun::GaudiMathImplementation::Adapter2DoubleFunction Function2D
Definition: Adapters.h:16

Function3D GaudiMath::adapter | ( | Function3D::Function | function | ) |

Definition at line 29 of file Adapters.cpp.

29 { return Function3D( function ); }
GaudiMath::Function3D
Genfun::GaudiMathImplementation::Adapter3DoubleFunction Function3D
Definition: Adapters.h:17

SimpleFunction GaudiMath::adapter | ( | SimpleFunction::Function1 | function | ) |

Definition at line 31 of file Adapters.cpp.

31 { return SimpleFunction( function ); }
GaudiMath::SimpleFunction
Genfun::GaudiMathImplementation::SimpleFunction SimpleFunction
Definition: Adapters.h:18

SimpleFunction GaudiMath::adapter | ( | const size_t | dim,
|  | SimpleFunction::Function2 | function
| ) |  |

Definition at line 33 of file Adapters.cpp.

34 {
35 return SimpleFunction( function, dim );
36 }
GaudiMath::SimpleFunction
Genfun::GaudiMathImplementation::SimpleFunction SimpleFunction
Definition: Adapters.h:18

SimpleFunction GaudiMath::adapter | ( | const size_t | dim,
|  | SimpleFunction::Function3 | function
| ) |  |

Definition at line 38 of file Adapters.cpp.

39 {
40 return SimpleFunction( function, dim );
41 }
GaudiMath::SimpleFunction
Genfun::GaudiMathImplementation::SimpleFunction SimpleFunction
Definition: Adapters.h:18

GSLFunctionWithMode GaudiMath::adapter | ( | GSLFunctionWithMode::Function | function,
|  | const gsl_mode_t & | mode
| ) |  |

Definition at line 43 of file Adapters.cpp.

44 {
45 return GSLFunctionWithMode( function, mode );
46 }
GaudiMath::GSLFunctionWithMode
Genfun::GaudiMathImplementation::GSLFunctionWithMode GSLFunctionWithMode
Definition: Adapters.h:20

GSLFunctionWithError GaudiMath::adapter | ( | GSLFunctionWithError::Function | function | ) |

Definition at line 48 of file Adapters.cpp.

48 { return GSLFunctionWithError( function ); }
GaudiMath::GSLFunctionWithError
Genfun::GaudiMathImplementation::GSLFunctionWithError GSLFunctionWithError
Definition: Adapters.h:21

GSLFunctionWithModeAndError GaudiMath::adapter | ( | GSLFunctionWithModeAndError::Function | function,
|  | const gsl_mode_t & | mode
| ) |  |

Definition at line 50 of file Adapters.cpp.

51 {
52 return GSLFunctionWithModeAndError( function, mode );
53 }
GaudiMath::GSLFunctionWithModeAndError
Genfun::GaudiMathImplementation::GSLFunctionWithModeAndError GSLFunctionWithModeAndError
Definition: Adapters.h:22

double GaudiMath::Integral | ( | const Genfun::AbsFunction & | function,
|  | const double | a,
|  | const double | b,
|  | const GaudiMath::Integration::Type | type = `GaudiMath::Integration::Adaptive`,
|  | const GaudiMath::Integration::KronrodRule | rule = `GaudiMath::Integration::Default`,
|  | const double | epsabs = `1.e-10`,
|  | const double | epsrel = `1.e-7`,
|  | const size_t | size = `1000`
| ) |  |

Definition at line 26 of file Integral.cpp.

29 {
30 if ( 1 != function.dimensionality() ) {
31 throw GaudiException( "GaudiMath::Integral: illegal function dimension", "*GaudiMath*", StatusCode::FAILURE );
32 }
33
34 const Genfun::AbsFunction& one = Genfun::GaudiMathImplementation::Constant( 1.0, 1 );
35
36 const Genfun::AbsFunction& cross = Genfun::FunctionDirectProduct( &one, &function );
37
38 const Genfun::AbsFunction& result =
39 Genfun::GaudiMathImplementation::NumericalDefiniteIntegral( cross, 1, a, b, type, rule, epsabs, epsrel, size );
40
41 return result( Genfun::Argument( 1 ) );
42 }
GaudiException
Define general base for Gaudi exception.
Definition: GaudiException.h:22
StatusCode::FAILURE
Definition: StatusCode.h:31
gaudirun.type
type
Definition: gaudirun.py:133
GaudiMath::Constant
Genfun::GaudiMathImplementation::Constant Constant
Definition: GaudiMath.h:26
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral
This class allows the numerical evaluation of the following functions:
Definition: NumericalDefiniteIntegral.h:79

double GaudiMath::Integral | ( | const Genfun::AbsFunction & | function,
|  | const double | a,
|  | const double | b,
|  | const std::vector< double > & | points,
|  | const double | epsabs = `1e-9`,
|  | const double | epsrel = `1.e-6`,
|  | const size_t | size = `1000`
| ) |  |

Definition at line 44 of file Integral.cpp.

46 {
47
48 if ( 1 != function.dimensionality() ) {
49 throw GaudiException( "GaudiMath::Integral: illegal function dimension", "*GaudiMath*", StatusCode::FAILURE );
50 }
51
52 const Genfun::AbsFunction& one = Genfun::GaudiMathImplementation::Constant( 1.0, 1 );
53
54 const Genfun::AbsFunction& cross = Genfun::FunctionDirectProduct( &one, &function );
55
56 const Genfun::AbsFunction& result =
57 Genfun::GaudiMathImplementation::NumericalDefiniteIntegral( cross, 1, a, b, points, epsabs, epsrel, size );
58
59 return result( Genfun::Argument( 1 ) );
60 }
GaudiException
Define general base for Gaudi exception.
Definition: GaudiException.h:22
StatusCode::FAILURE
Definition: StatusCode.h:31
GaudiMath::Constant
Genfun::GaudiMathImplementation::Constant Constant
Definition: GaudiMath.h:26
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral
This class allows the numerical evaluation of the following functions:
Definition: NumericalDefiniteIntegral.h:79

double GaudiMath::Integral | ( | const Genfun::AbsFunction & | function,
|  | 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`
| ) |  |

Definition at line 62 of file Integral.cpp.

64 {
65 if ( 1 != function.dimensionality() ) {
66 throw GaudiException( "GaudiMath::Integral: illegal function dimension", "*GaudiMath*", StatusCode::FAILURE );
67 }
68
69 const Genfun::AbsFunction& one = Genfun::GaudiMathImplementation::Constant( 1.0, 1 );
70
71 const Genfun::AbsFunction& cross = Genfun::FunctionDirectProduct( &one, &function );
72
73 const Genfun::AbsFunction& result =
74 Genfun::GaudiMathImplementation::NumericalDefiniteIntegral( cross, 1, a, b, epsabs, epsrel, size );
75
76 return result( Genfun::Argument( 1 ) );
77 }
GaudiException
Define general base for Gaudi exception.
Definition: GaudiException.h:22
StatusCode::FAILURE
Definition: StatusCode.h:31
GaudiMath::Constant
Genfun::GaudiMathImplementation::Constant Constant
Definition: GaudiMath.h:26
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral
This class allows the numerical evaluation of the following functions:
Definition: NumericalDefiniteIntegral.h:79

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

Definition at line 79 of file Integral.cpp.

81 {
82 if ( 1 != function.dimensionality() ) {
83 throw GaudiException( "GaudiMath::Integral: illegal function dimension", "*GaudiMath*", StatusCode::FAILURE );
84 }
85
86 const Genfun::AbsFunction& one = Genfun::GaudiMathImplementation::Constant( 1.0, 1 );
87
88 const Genfun::AbsFunction& cross = Genfun::FunctionDirectProduct( &one, &function );
89
90 const Genfun::AbsFunction& result =
91 Genfun::GaudiMathImplementation::NumericalDefiniteIntegral( cross, 1, a, b, epsabs, epsrel, size );
92
93 return result( Genfun::Argument( 1 ) );
94 }
GaudiException
Define general base for Gaudi exception.
Definition: GaudiException.h:22
StatusCode::FAILURE
Definition: StatusCode.h:31
GaudiMath::Constant
Genfun::GaudiMathImplementation::Constant Constant
Definition: GaudiMath.h:26
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral
This class allows the numerical evaluation of the following functions:
Definition: NumericalDefiniteIntegral.h:79

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

Definition at line 96 of file Integral.cpp.

99 {
100 if ( 1 != function.dimensionality() ) {
101 throw GaudiException( "GaudiMath::Integral: illegal function dimension", "*GaudiMath*", StatusCode::FAILURE );
102 }
103
104 const Genfun::AbsFunction& one = Genfun::GaudiMathImplementation::Constant( 1.0, 1 );
105
106 const Genfun::AbsFunction& cross = Genfun::FunctionDirectProduct( &one, &function );
107
108 // FIXME: (MCl) the static_cast below are needed to avoid warnings and to
109 // match the signature in NumericalDefiniteIntegral.h (around line 288).
110 const Genfun::AbsFunction& result = Genfun::GaudiMathImplementation::NumericalDefiniteIntegral(
111 cross, 1, static_cast<float>( epsabs ), static_cast<float>( epsrel ), size );
112
113 return result( Genfun::Argument( 1 ) );
114 }
GaudiException
Define general base for Gaudi exception.
Definition: GaudiException.h:22
StatusCode::FAILURE
Definition: StatusCode.h:31
GaudiMath::Constant
Genfun::GaudiMathImplementation::Constant Constant
Definition: GaudiMath.h:26
Genfun::GaudiMathImplementation::NumericalDefiniteIntegral
This class allows the numerical evaluation of the following functions:
Definition: NumericalDefiniteIntegral.h:79