| 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::GSLFunctionWithError Class Reference

`#include <GaudiMath/GSLFunAdapters.h>`

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

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

## Public Member Functions
| GSLFunctionWithError (Function function)
| mandatory macro from CLHEP/GenericFunctions More...
| GSLFunctionWithError (const GSLFunctionWithError &)
| copy constructor More...
virtual | ~GSLFunctionWithError ()=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_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
| GSLFunctionWithError ()
GSLFunctionWithError & | operator= (const GSLFunctionWithError &)

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

## Detailed Description

Definition at line 32 of file GSLFunAdapters.h.

## Member Typedef Documentation

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

the actual type of the function

Definition at line 36 of file GSLFunAdapters.h.

## Constructor & Destructor Documentation

Genfun::GaudiMathImplementation::GSLFunctionWithError::GSLFunctionWithError | ( | GSLFunctionWithError::Function | function | ) |

mandatory macro from CLHEP/GenericFunctions

constructor with pointer to function

Definition at line 30 of file GSLFunAdapters.cpp.

31 : AbsFunction()
32 , m_function ( function )
33 , m_result ( new gsl_sf_result() )
34 {
35 m_result -> val = -1.e+10 ;
36 m_result -> err = -1.e+10 ;
37 }
Genfun::GaudiMathImplementation::GSLFunctionWithError::m_result
std::unique_ptr< gsl_sf_result > m_result
Definition: GSLFunAdapters.h:67
Genfun::GaudiMathImplementation::GSLFunctionWithError::m_function
Function m_function
Definition: GSLFunAdapters.h:66

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

copy constructor

Definition at line 40 of file GSLFunAdapters.cpp.

41 : AbsFunction()
42 , m_function ( func.m_function )
43 , m_result ( new gsl_sf_result() )
44 {
45 m_result -> val = func.m_result -> val ;
46 m_result -> err = func.m_result -> err ;
47 }
Genfun::GaudiMathImplementation::GSLFunctionWithError::m_result
std::unique_ptr< gsl_sf_result > m_result
Definition: GSLFunAdapters.h:67
GaudiPluginService.cpluginsvc.func
tuple func
Definition: cpluginsvc.py:218
Genfun::GaudiMathImplementation::GSLFunctionWithError::m_function
Function m_function
Definition: GSLFunAdapters.h:66

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

destructor

Genfun::GaudiMathImplementation::GSLFunctionWithError::GSLFunctionWithError | ( |  | ) |
| private

## Member Function Documentation

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

Definition at line 51 of file GSLFunAdapters.h.

51 { return 1 ; }

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

get the error in the last estimate of the result

Definition at line 82 of file GSLFunAdapters.cpp.

83 { return m_result -> err ; }
Genfun::GaudiMathImplementation::GSLFunctionWithError::m_result
std::unique_ptr< gsl_sf_result > m_result
Definition: GSLFunAdapters.h:67

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

get the function itself

Definition at line 76 of file GSLFunAdapters.cpp.

77 { return m_function ; }
Genfun::GaudiMathImplementation::GSLFunctionWithError::m_function
Function m_function
Definition: GSLFunAdapters.h:66

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

Definition at line 50 of file GSLFunAdapters.h.

50 { return true ; }

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

the main method

Definition at line 51 of file GSLFunAdapters.cpp.

52 {
53 (*m_function)( x , m_result.get() ) ;
54 return m_result -> val ;
55 }
Genfun::GaudiMathImplementation::GSLFunctionWithError::m_result
std::unique_ptr< gsl_sf_result > m_result
Definition: GSLFunAdapters.h:67
std::unique_ptr::get
T get(T...args)

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

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

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

Definition at line 65 of file GSLFunAdapters.cpp.

66 {
67 if( i >= 1 )
68 {
69 const AbsFunction& aux = GaudiMath::Constant( 0 , 1 ) ;
70 return Genfun::FunctionNoop( &aux ) ;
71 };
72 const AbsFunction& aux = GaudiMath::Derivative( *this , i) ;
73 return Genfun::FunctionNoop( &aux ) ;
74 }
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::GSLFunctionWithError::result | ( |  | ) | const

get the last evaluated result

Definition at line 79 of file GSLFunAdapters.cpp.

80 { return *m_result ; }
Genfun::GaudiMathImplementation::GSLFunctionWithError::m_result
std::unique_ptr< gsl_sf_result > m_result
Definition: GSLFunAdapters.h:67

## Member Data Documentation

Function Genfun::GaudiMathImplementation::GSLFunctionWithError::m_function
| private

Definition at line 66 of file GSLFunAdapters.h.

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

Definition at line 67 of file GSLFunAdapters.h.

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

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