All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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

Typedef Documentation

typedef Genfun::AbsFunction GaudiMath::Function

Definition at line 24 of file GaudiMath.h.

Function Documentation

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

Definition at line 27 of file Adapters.cpp.

28  { return AIDAFunction( function ) ; }
Genfun::GaudiMathImplementation::AdapterIFunction AIDAFunction
Definition: Adapters.h:16
Function2D GaudiMath::adapter ( Function2D::Function  function)

Definition at line 31 of file Adapters.cpp.

32  { return Function2D ( function ) ; }
Genfun::GaudiMathImplementation::Adapter2DoubleFunction Function2D
Definition: Adapters.h:18
Function3D GaudiMath::adapter ( Function3D::Function  function)

Definition at line 35 of file Adapters.cpp.

36  { return Function3D ( function ) ; }
Genfun::GaudiMathImplementation::Adapter3DoubleFunction Function3D
Definition: Adapters.h:20
SimpleFunction GaudiMath::adapter ( SimpleFunction::Function1  function)

Definition at line 39 of file Adapters.cpp.

40  { return SimpleFunction ( function ) ; }
Genfun::GaudiMathImplementation::SimpleFunction SimpleFunction
Definition: Adapters.h:22
SimpleFunction GaudiMath::adapter ( const size_t  dim,
SimpleFunction::Function2  function 
)

Definition at line 43 of file Adapters.cpp.

45  { return SimpleFunction ( function , dim ) ; }
Genfun::GaudiMathImplementation::SimpleFunction SimpleFunction
Definition: Adapters.h:22
SimpleFunction GaudiMath::adapter ( const size_t  dim,
SimpleFunction::Function3  function 
)

Definition at line 48 of file Adapters.cpp.

50  { return SimpleFunction ( function , dim ) ; }
Genfun::GaudiMathImplementation::SimpleFunction SimpleFunction
Definition: Adapters.h:22
GSLFunctionWithMode GaudiMath::adapter ( GSLFunctionWithMode::Function  function,
const gsl_mode_t &  mode 
)

Definition at line 53 of file Adapters.cpp.

55  { return GSLFunctionWithMode ( function , mode ) ; }
Genfun::GaudiMathImplementation::GSLFunctionWithMode GSLFunctionWithMode
Definition: Adapters.h:25
GSLFunctionWithError GaudiMath::adapter ( GSLFunctionWithError::Function  function)

Definition at line 58 of file Adapters.cpp.

59  { return GSLFunctionWithError ( function ) ; }
Genfun::GaudiMathImplementation::GSLFunctionWithError GSLFunctionWithError
Definition: Adapters.h:27
GSLFunctionWithModeAndError GaudiMath::adapter ( GSLFunctionWithModeAndError::Function  function,
const gsl_mode_t &  mode 
)

Definition at line 62 of file Adapters.cpp.

64  { return GSLFunctionWithModeAndError ( function , mode ) ; }
Genfun::GaudiMathImplementation::GSLFunctionWithModeAndError GSLFunctionWithModeAndError
Definition: Adapters.h:29
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 27 of file Integral.cpp.

35  {
36  if ( 1 != function.dimensionality() )
37  { throw GaudiException
38  ("GaudiMath::Integral: illegal function dimension" ,
39  "*GaudiMath*" , StatusCode::FAILURE ); }
40 
41  const Genfun::AbsFunction& one =
43 
44  const Genfun::AbsFunction& cross =
45  Genfun::FunctionDirectProduct (&one , &function ) ;
46 
47  const Genfun::AbsFunction& result =
49  ( cross , 1 , a , b, type , rule , epsabs , epsrel , size ) ;
50 
51  return result( Genfun::Argument(1) ) ;
52  }
Define general base for Gaudi exception.
Genfun::GaudiMathImplementation::Constant Constant
Definition: GaudiMath.h:27
This class allows the numerical evaluation of the following functions:
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 55 of file Integral.cpp.

62  {
63 
64  if ( 1 != function.dimensionality() )
65  { throw GaudiException
66  ("GaudiMath::Integral: illegal function dimension" ,
67  "*GaudiMath*" , StatusCode::FAILURE ); }
68 
69  const Genfun::AbsFunction& one =
71 
72  const Genfun::AbsFunction& cross =
73  Genfun::FunctionDirectProduct (&one , &function ) ;
74 
75  const Genfun::AbsFunction& result =
77  ( cross , 1 , a , b, points , epsabs , epsrel , size ) ;
78 
79  return result( Genfun::Argument(1) ) ;
80  }
Define general base for Gaudi exception.
Genfun::GaudiMathImplementation::Constant Constant
Definition: GaudiMath.h:27
This class allows the numerical evaluation of the following functions:
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 83 of file Integral.cpp.

89  {
90  if ( 1 != function.dimensionality() )
91  { throw GaudiException
92  ("GaudiMath::Integral: illegal function dimension" ,
93  "*GaudiMath*" , StatusCode::FAILURE ); }
94 
95  const Genfun::AbsFunction& one =
97 
98  const Genfun::AbsFunction& cross =
99  Genfun::FunctionDirectProduct (&one , &function ) ;
100 
101  const Genfun::AbsFunction& result =
103  ( cross , 1 , a , b , epsabs , epsrel , size ) ;
104 
105  return result( Genfun::Argument(1) ) ;
106  }
Define general base for Gaudi exception.
Genfun::GaudiMathImplementation::Constant Constant
Definition: GaudiMath.h:27
This class allows the numerical evaluation of the following functions:
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 109 of file Integral.cpp.

115  {
116  if ( 1 != function.dimensionality() )
117  { throw GaudiException
118  ("GaudiMath::Integral: illegal function dimension" ,
119  "*GaudiMath*" , StatusCode::FAILURE ); }
120 
121  const Genfun::AbsFunction& one =
123 
124  const Genfun::AbsFunction& cross =
125  Genfun::FunctionDirectProduct (&one , &function ) ;
126 
127  const Genfun::AbsFunction& result =
129  ( cross , 1 , a , b , epsabs , epsrel , size ) ;
130 
131  return result( Genfun::Argument(1) ) ;
132  }
Define general base for Gaudi exception.
Genfun::GaudiMathImplementation::Constant Constant
Definition: GaudiMath.h:27
This class allows the numerical evaluation of the following functions:
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 137 of file Integral.cpp.

143  {
144  if ( 1 != function.dimensionality() )
145  { throw GaudiException
146  ("GaudiMath::Integral: illegal function dimension" ,
147  "*GaudiMath*" , StatusCode::FAILURE ); }
148 
149  const Genfun::AbsFunction& one =
151 
152  const Genfun::AbsFunction& cross =
153  Genfun::FunctionDirectProduct (&one , &function ) ;
154 
155  // FIXME: (MCl) the static_cast below are needed to avoid warnings and to
156  // match the signature in NumericalDefiniteIntegral.h (around line 288).
157  const Genfun::AbsFunction& result =
159  ( cross , 1 , static_cast<float>(epsabs) , static_cast<float>(epsrel) , size ) ;
160 
161  return result( Genfun::Argument(1) ) ;
162  }
Define general base for Gaudi exception.
Genfun::GaudiMathImplementation::Constant Constant
Definition: GaudiMath.h:27
This class allows the numerical evaluation of the following functions: