| The Gaudi Framework v28r2-patches (bc4ad17a)

- 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...
| ~GSLFunctionWithError () override=default
| destructor More...
double | operator() (double x) const override
| the main method More...
double | operator() (const Argument &x) const override
bool | hasAnalyticDerivative () const override
unsigned int | dimensionality () const override
Genfun::Derivative | partial (unsigned int i) const override
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 40 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 44 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 28 of file GSLFunAdapters.cpp.

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

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

copy constructor

Definition at line 38 of file GSLFunAdapters.cpp.

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

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

destructor

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

## Member Function Documentation

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

Definition at line 59 of file GSLFunAdapters.h.

59 { return 1 ; }

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

get the error in the last estimate of the result

Definition at line 79 of file GSLFunAdapters.cpp.

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

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

get the function itself

Definition at line 73 of file GSLFunAdapters.cpp.

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

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

Definition at line 58 of file GSLFunAdapters.h.

58 { return true ; }

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

the main method

Definition at line 48 of file GSLFunAdapters.cpp.

49 {
50 (*m_function)( x , m_result.get() ) ;
51 return m_result -> val ;
52 }
Genfun::GaudiMathImplementation::GSLFunctionWithError::m_result
std::unique_ptr< gsl_sf_result > m_result
Definition: GSLFunAdapters.h:75
std::unique_ptr::get
T get(T...args)

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

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

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

Definition at line 62 of file GSLFunAdapters.cpp.

63 {
64 if( i >= 1 )
65 {
66 const AbsFunction& aux = GaudiMath::Constant( 0 , 1 ) ;
67 return Genfun::FunctionNoop( &aux ) ;
68 };
69 const AbsFunction& aux = GaudiMath::Derivative( *this , i) ;
70 return Genfun::FunctionNoop( &aux ) ;
71 }
GaudiMath::Derivative
Genfun::GaudiMathImplementation::NumericalDerivative Derivative
Definition: GaudiMath.h:29
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 76 of file GSLFunAdapters.cpp.

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

## Member Data Documentation

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

Definition at line 74 of file GSLFunAdapters.h.

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

Definition at line 75 of file GSLFunAdapters.h.

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

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