| The Gaudi Framework v27r1

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

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
Genfun::GaudiMathImplementation::GSLFunctionWithModeAndError Class Reference

`#include <GaudiMath/GSLFunAdapters.h>`

Inheritance diagram for Genfun::GaudiMathImplementation::GSLFunctionWithModeAndError:
[legend]
Collaboration diagram for Genfun::GaudiMathImplementation::GSLFunctionWithModeAndError:
[legend]

## Public Types
typedef int(* | Function) (double, gsl_mode_t, gsl_sf_result *)
| the actual type of the function More...

## Public Member Functions
| GSLFunctionWithModeAndError (Function fun, const gsl_mode_t &mode)
| mandatory macro from CLHEP/GenericFunctions More...
| GSLFunctionWithModeAndError (const GSLFunctionWithModeAndError &)
| copy constructor More...
virtual | ~GSLFunctionWithModeAndError ()=default
| destructor More...
virtual double | operator() (double x) const
| the main method More...
virtual double | operator() (const Argument &x) const
virtual bool | hasAnalyticDerivative () const
virtual unsigned int | dimensionality () const
Genfun::Derivative | partial (unsigned int i) const
Function | function () const
| get the function itself More...
const gsl_mode_t & | mode () const
| get the current mode More...
const gsl_sf_result & | result () const
| get the last evaluated result More...
double | error () const
| get the error in the last estimate of the result More...

## Private Member Functions
| GSLFunctionWithModeAndError ()
GSLFunctionWithModeAndError & | operator= (const GSLFunctionWithModeAndError &)

## Private Attributes
Function | m_function
std::unique_ptr< gsl_mode_t > | m_mode
std::unique_ptr< gsl_sf_result > | m_result

## Detailed Description

Definition at line 106 of file GSLFunAdapters.h.

## Member Typedef Documentation

typedef int(* Genfun::GaudiMathImplementation::GSLFunctionWithModeAndError::Function) (double, gsl_mode_t, gsl_sf_result *)

the actual type of the function

Definition at line 110 of file GSLFunAdapters.h.

## Constructor & Destructor Documentation

Genfun::GaudiMathImplementation::GSLFunctionWithModeAndError::GSLFunctionWithModeAndError | ( | GSLFunctionWithModeAndError::Function | function,
|  | const gsl_mode_t & | mode
| ) |  |

mandatory macro from CLHEP/GenericFunctions

constructor with pointer to function

Definition at line 137 of file GSLFunAdapters.cpp.

139 : AbsFunction()
140 , m_function ( function )
141 , m_mode ( new gsl_mode_t() )
142 , m_result ( new gsl_sf_result() )
143 {
144 *m_mode = mod ;
145 m_result -> val = -1.e+10 ;
146 m_result -> err = -1.e+10 ;
147 }
Gaudi.CommonGaudiConfigurables.mod
tuple mod
Definition: CommonGaudiConfigurables.py:22
Genfun::GaudiMathImplementation::GSLFunctionWithModeAndError::m_mode
std::unique_ptr< gsl_mode_t > m_mode
Definition: GSLFunAdapters.h:146
Genfun::GaudiMathImplementation::GSLFunctionWithModeAndError::m_result
std::unique_ptr< gsl_sf_result > m_result
Definition: GSLFunAdapters.h:147
Genfun::GaudiMathImplementation::GSLFunctionWithModeAndError::m_function
Function m_function
Definition: GSLFunAdapters.h:145

Genfun::GaudiMathImplementation::GSLFunctionWithModeAndError::GSLFunctionWithModeAndError | ( | const GSLFunctionWithModeAndError & | func | ) |

copy constructor

Definition at line 150 of file GSLFunAdapters.cpp.

151 : AbsFunction()
152 , m_function ( func.m_function )
153 , m_mode ( new gsl_mode_t () )
154 , m_result ( new gsl_sf_result() )
155 {
156 *m_mode = *(func.m_mode) ;
157 m_result -> val = func.m_result -> val ;
158 m_result -> err = func.m_result -> err ;
159 }
Genfun::GaudiMathImplementation::GSLFunctionWithModeAndError::m_mode
std::unique_ptr< gsl_mode_t > m_mode
Definition: GSLFunAdapters.h:146
GaudiPluginService.cpluginsvc.func
tuple func
Definition: cpluginsvc.py:218
Genfun::GaudiMathImplementation::GSLFunctionWithModeAndError::m_result
std::unique_ptr< gsl_sf_result > m_result
Definition: GSLFunAdapters.h:147
Genfun::GaudiMathImplementation::GSLFunctionWithModeAndError::m_function
Function m_function
Definition: GSLFunAdapters.h:145

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

destructor

Genfun::GaudiMathImplementation::GSLFunctionWithModeAndError::GSLFunctionWithModeAndError | ( |  | ) |
| private

## Member Function Documentation

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

Definition at line 128 of file GSLFunAdapters.h.

128 { return 1 ; }

double Genfun::GaudiMathImplementation::GSLFunctionWithModeAndError::error | ( |  | ) | const

get the error in the last estimate of the result

Definition at line 201 of file GSLFunAdapters.cpp.

202 { return m_result -> err ; }
Genfun::GaudiMathImplementation::GSLFunctionWithModeAndError::m_result
std::unique_ptr< gsl_sf_result > m_result
Definition: GSLFunAdapters.h:147

GSLFunctionWithModeAndError::Function Genfun::GaudiMathImplementation::GSLFunctionWithModeAndError::function | ( |  | ) | const

get the function itself

Definition at line 189 of file GSLFunAdapters.cpp.

190 { return m_function ; }
Genfun::GaudiMathImplementation::GSLFunctionWithModeAndError::m_function
Function m_function
Definition: GSLFunAdapters.h:145

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

Definition at line 127 of file GSLFunAdapters.h.

127 { return true ; }

const gsl_mode_t & Genfun::GaudiMathImplementation::GSLFunctionWithModeAndError::mode | ( |  | ) | const

get the current mode

Definition at line 193 of file GSLFunAdapters.cpp.

194 { return *m_mode ; }
Genfun::GaudiMathImplementation::GSLFunctionWithModeAndError::m_mode
std::unique_ptr< gsl_mode_t > m_mode
Definition: GSLFunAdapters.h:146

double Genfun::GaudiMathImplementation::GSLFunctionWithModeAndError::operator() | ( | double | x | ) | const
| virtual

the main method

Definition at line 163 of file GSLFunAdapters.cpp.

164 {
165 (*m_function)( x , *m_mode , m_result.get() ) ;
166 return m_result -> val ;
167 }
Genfun::GaudiMathImplementation::GSLFunctionWithModeAndError::m_mode
std::unique_ptr< gsl_mode_t > m_mode
Definition: GSLFunAdapters.h:146
Genfun::GaudiMathImplementation::GSLFunctionWithModeAndError::m_result
std::unique_ptr< gsl_sf_result > m_result
Definition: GSLFunAdapters.h:147
std::unique_ptr::get
T get(T...args)

virtual double Genfun::GaudiMathImplementation::GSLFunctionWithModeAndError::operator() | ( | const Argument & | x | ) | const
| virtual

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

Genfun::Derivative Genfun::GaudiMathImplementation::GSLFunctionWithModeAndError::partial | ( | unsigned int | i | ) | const

Definition at line 177 of file GSLFunAdapters.cpp.

178 {
179 if( i >= 1 )
180 {
181 const AbsFunction& aux = GaudiMath::Constant( 0 , 1 ) ;
182 return Genfun::FunctionNoop( &aux ) ;
183 };
184 const AbsFunction& aux = GaudiMath::Derivative( *this , i) ;
185 return Genfun::FunctionNoop( &aux ) ;
186 }
GaudiMath::Derivative
Genfun::GaudiMathImplementation::NumericalDerivative Derivative
Definition: GaudiMath.h:29
ana.i
list i
Definition: ana.py:128
GaudiMath::Constant
Genfun::GaudiMathImplementation::Constant Constant
Definition: GaudiMath.h:27

const gsl_sf_result & Genfun::GaudiMathImplementation::GSLFunctionWithModeAndError::result | ( |  | ) | const

get the last evaluated result

Definition at line 197 of file GSLFunAdapters.cpp.

198 { return *m_result ; }
Genfun::GaudiMathImplementation::GSLFunctionWithModeAndError::m_result
std::unique_ptr< gsl_sf_result > m_result
Definition: GSLFunAdapters.h:147

## Member Data Documentation

Function Genfun::GaudiMathImplementation::GSLFunctionWithModeAndError::m_function
| private

Definition at line 145 of file GSLFunAdapters.h.

std::unique_ptr<gsl_mode_t> Genfun::GaudiMathImplementation::GSLFunctionWithModeAndError::m_mode
| private

Definition at line 146 of file GSLFunAdapters.h.

std::unique_ptr<gsl_sf_result> Genfun::GaudiMathImplementation::GSLFunctionWithModeAndError::m_result
| private

Definition at line 147 of file GSLFunAdapters.h.

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

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