| The Gaudi Framework v30r0 (c919700c)

- 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 27 of file GSLFunAdapters.cpp.

28 : AbsFunction(), m_function( function ), m_result( std::make_unique<gsl_sf_result>() )
29 {
30 m_result->val = -1.e+10;
31 m_result->err = -1.e+10;
32 }
Genfun::GaudiMathImplementation::GSLFunctionWithError::m_result
std::unique_ptr< gsl_sf_result > m_result
Definition: GSLFunAdapters.h:78
Genfun::GaudiMathImplementation::GSLFunctionWithError::m_function
Function m_function
Definition: GSLFunAdapters.h:77

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

copy constructor

Definition at line 34 of file GSLFunAdapters.cpp.

35 : AbsFunction(), m_function( func.m_function ), m_result( std::make_unique<gsl_sf_result>() )
36 {
37 m_result->val = func.m_result->val;
38 m_result->err = func.m_result->err;
39 }
Genfun::GaudiMathImplementation::GSLFunctionWithError::m_result
std::unique_ptr< gsl_sf_result > m_result
Definition: GSLFunAdapters.h:78
GaudiPluginService.cpluginsvc.func
func
Definition: cpluginsvc.py:229
Genfun::GaudiMathImplementation::GSLFunctionWithError::m_function
Function m_function
Definition: GSLFunAdapters.h:77

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 60 of file GSLFunAdapters.h.

60 { return 1; }

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

get the error in the last estimate of the result

Definition at line 67 of file GSLFunAdapters.cpp.

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

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

get the function itself

Definition at line 63 of file GSLFunAdapters.cpp.

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

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

Definition at line 59 of file GSLFunAdapters.h.

59 { return true; }

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

the main method

Definition at line 41 of file GSLFunAdapters.cpp.

42 {
43 ( *m_function )( x, m_result.get() );
44 return m_result->val;
45 }
Genfun::GaudiMathImplementation::GSLFunctionWithError::m_result
std::unique_ptr< gsl_sf_result > m_result
Definition: GSLFunAdapters.h:78
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 53 of file GSLFunAdapters.cpp.

54 {
55 if ( i >= 1 ) {
56 const AbsFunction& aux = GaudiMath::Constant( 0, 1 );
57 return Genfun::FunctionNoop( &aux );
58 };
59 const AbsFunction& aux = GaudiMath::Derivative( *this, i );
60 return Genfun::FunctionNoop( &aux );
61 }
GaudiMath::Derivative
Genfun::GaudiMathImplementation::NumericalDerivative Derivative
Definition: GaudiMath.h:27
GaudiMath::Constant
Genfun::GaudiMathImplementation::Constant Constant
Definition: GaudiMath.h:26

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

get the last evaluated result

Definition at line 65 of file GSLFunAdapters.cpp.

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

## Member Data Documentation

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

Definition at line 77 of file GSLFunAdapters.h.

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

Definition at line 78 of file GSLFunAdapters.h.

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

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