12 #include "gsl/gsl_mode.h"
13 #include "gsl/gsl_sf_result.h"
25 namespace GaudiMathImplementation
33 , m_function ( function )
34 , m_result ( new gsl_sf_result() )
36 m_result -> val = -1.e+10 ;
37 m_result -> err = -1.e+10 ;
44 , m_result (
new gsl_sf_result() )
46 m_result -> val = func.
m_result -> val ;
47 m_result -> err = func.
m_result -> err ;
53 double GSLFunctionWithError::operator()
56 (*m_function)( x , m_result ) ;
57 return m_result -> val ;
60 double GSLFunctionWithError::operator()
61 (
const Genfun::Argument& x )
const
63 (*m_function)( x[0] , m_result ) ;
64 return m_result -> val ;
68 (
unsigned int i )
const
73 return Genfun::FunctionNoop( &aux ) ;
76 return Genfun::FunctionNoop( &aux ) ;
93 const gsl_mode_t&
mod )
95 , m_function ( function )
96 , m_mode ( new gsl_mode_t() )
105 , m_mode (
new gsl_mode_t () )
107 *m_mode = *(func.
m_mode) ;
113 double GSLFunctionWithMode::operator()
115 {
return (*m_function)( x , *m_mode ) ; }
117 double GSLFunctionWithMode::operator()
118 (
const Genfun::Argument& x )
const
119 {
return (*m_function)( x[0] , *m_mode ) ; }
122 (
unsigned int i )
const
127 return Genfun::FunctionNoop( &aux ) ;
130 return Genfun::FunctionNoop( &aux ) ;
144 const gsl_mode_t&
mod )
146 , m_function ( function )
147 , m_mode ( new gsl_mode_t() )
148 , m_result ( new gsl_sf_result() )
151 m_result -> val = -1.e+10 ;
152 m_result -> err = -1.e+10 ;
159 , m_mode (
new gsl_mode_t () )
160 , m_result (
new gsl_sf_result() )
162 *m_mode = *(func.
m_mode) ;
163 m_result -> val = func.
m_result -> val ;
164 m_result -> err = func.
m_result -> err ;
173 double GSLFunctionWithModeAndError::operator()
176 (*m_function)( x , *m_mode , m_result ) ;
177 return m_result -> val ;
180 double GSLFunctionWithModeAndError::operator()
181 (
const Genfun::Argument& x )
const
183 (*m_function)( x[0] , *m_mode , m_result ) ;
184 return m_result -> val ;
188 (
unsigned int i )
const
193 return Genfun::FunctionNoop( &aux ) ;
196 return Genfun::FunctionNoop( &aux ) ;
virtual ~GSLFunctionWithError()
destructor
Function function() const
get the function itself
Genfun::GaudiMathImplementation::GSLFunctionWithError GSLFunctionWithError
Function function() const
get the function itself
const gsl_sf_result & result() const
get the last evaluated result
int(* Function)(double, gsl_mode_t, gsl_sf_result *)
the actual type of the function
const gsl_sf_result & result() const
get the last evaluated result
Genfun::AbsFunction Function
Genfun::GaudiMathImplementation::NumericalDerivative Derivative
virtual ~GSLFunctionWithMode()
destructor
Genfun::Derivative partial(unsigned int i) const
Genfun::Derivative partial(unsigned int i) const
const gsl_mode_t & mode() const
get the current mode
Function function() const
get the function itself
Genfun::Derivative partial(unsigned int i) const
double(* Function)(double, gsl_mode_t)
the actual type of the function
virtual ~GSLFunctionWithModeAndError()
destructor
GSLFunctionWithModeAndError()
const gsl_mode_t & mode() const
get the current mode
double error() const
get the error in the last estimate of the result
Genfun::GaudiMathImplementation::Constant Constant
double error() const
get the error in the last estimate of the result
int(* Function)(double, gsl_sf_result *)
the actual type of the function