| The Gaudi Framework v28r2p1 (f1a77ff4)

- 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

mandatory macro from CLHEP/GenericFunctions More...

`#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...
| ~GSLFunctionWithModeAndError () 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_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

mandatory macro from CLHEP/GenericFunctions

Definition at line 118 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 122 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 130 of file GSLFunAdapters.cpp.

132 : AbsFunction()
133 , m_function ( function )
134 , m_mode ( new gsl_mode_t() )
135 , m_result ( new gsl_sf_result() )
136 {
137 *m_mode = mod ;
138 m_result -> val = -1.e+10 ;
139 m_result -> err = -1.e+10 ;
140 }
Genfun::GaudiMathImplementation::GSLFunctionWithModeAndError::m_mode
std::unique_ptr< gsl_mode_t > m_mode
Definition: GSLFunAdapters.h:158
Gaudi.CommonGaudiConfigurables.mod
mod
Definition: CommonGaudiConfigurables.py:22
Genfun::GaudiMathImplementation::GSLFunctionWithModeAndError::m_result
std::unique_ptr< gsl_sf_result > m_result
Definition: GSLFunAdapters.h:159
Genfun::GaudiMathImplementation::GSLFunctionWithModeAndError::m_function
Function m_function
Definition: GSLFunAdapters.h:157

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

copy constructor

Definition at line 143 of file GSLFunAdapters.cpp.

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

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

destructor

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

## Member Function Documentation

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

Definition at line 140 of file GSLFunAdapters.h.

140 { return 1 ; }

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

get the error in the last estimate of the result

Definition at line 193 of file GSLFunAdapters.cpp.

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

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

get the function itself

Definition at line 181 of file GSLFunAdapters.cpp.

182 { return m_function ; }
Genfun::GaudiMathImplementation::GSLFunctionWithModeAndError::m_function
Function m_function
Definition: GSLFunAdapters.h:157

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

Definition at line 139 of file GSLFunAdapters.h.

139 { return true ; }

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

get the current mode

Definition at line 185 of file GSLFunAdapters.cpp.

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

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

the main method

Definition at line 155 of file GSLFunAdapters.cpp.

156 {
157 (*m_function)( x , *m_mode , m_result.get() ) ;
158 return m_result -> val ;
159 }
Genfun::GaudiMathImplementation::GSLFunctionWithModeAndError::m_mode
std::unique_ptr< gsl_mode_t > m_mode
Definition: GSLFunAdapters.h:158
Genfun::GaudiMathImplementation::GSLFunctionWithModeAndError::m_result
std::unique_ptr< gsl_sf_result > m_result
Definition: GSLFunAdapters.h:159
std::unique_ptr::get
T get(T...args)

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

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

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

Definition at line 169 of file GSLFunAdapters.cpp.

170 {
171 if( i >= 1 )
172 {
173 const AbsFunction& aux = GaudiMath::Constant( 0 , 1 ) ;
174 return Genfun::FunctionNoop( &aux ) ;
175 };
176 const AbsFunction& aux = GaudiMath::Derivative( *this , i) ;
177 return Genfun::FunctionNoop( &aux ) ;
178 }
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::GSLFunctionWithModeAndError::result | ( |  | ) | const

get the last evaluated result

Definition at line 189 of file GSLFunAdapters.cpp.

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

## Member Data Documentation

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

Definition at line 157 of file GSLFunAdapters.h.

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

Definition at line 158 of file GSLFunAdapters.h.

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

Definition at line 159 of file GSLFunAdapters.h.

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

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