| The Gaudi Framework v29r0 (ff2e7097)

- 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 123 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 127 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 100 of file GSLFunAdapters.cpp.

102 : AbsFunction()
103 , m_function( function )
104 , m_mode( std::make_unique<gsl_mode_t>( mod ) )
105 , m_result( std::make_unique<gsl_sf_result>( gsl_sf_result{-1.e+10, -1.e+10} ) )
106 {
107 }
Genfun::GaudiMathImplementation::GSLFunctionWithModeAndError::m_mode
std::unique_ptr< gsl_mode_t > m_mode
Definition: GSLFunAdapters.h:162
Gaudi.CommonGaudiConfigurables.mod
mod
Definition: CommonGaudiConfigurables.py:22
Genfun::GaudiMathImplementation::GSLFunctionWithModeAndError::m_result
std::unique_ptr< gsl_sf_result > m_result
Definition: GSLFunAdapters.h:163
Genfun::GaudiMathImplementation::GSLFunctionWithModeAndError::m_function
Function m_function
Definition: GSLFunAdapters.h:161

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

copy constructor

Definition at line 109 of file GSLFunAdapters.cpp.

110 : AbsFunction()
111 , m_function( func.m_function )
112 , m_mode( std::make_unique<gsl_mode_t>( *func.m_mode ) )
113 , m_result( std::make_unique<gsl_sf_result>( *func.m_result ) )
114 {
115 }
Genfun::GaudiMathImplementation::GSLFunctionWithModeAndError::m_mode
std::unique_ptr< gsl_mode_t > m_mode
Definition: GSLFunAdapters.h:162
GaudiPluginService.cpluginsvc.func
func
Definition: cpluginsvc.py:229
Genfun::GaudiMathImplementation::GSLFunctionWithModeAndError::m_result
std::unique_ptr< gsl_sf_result > m_result
Definition: GSLFunAdapters.h:163
Genfun::GaudiMathImplementation::GSLFunctionWithModeAndError::m_function
Function m_function
Definition: GSLFunAdapters.h:161

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

143 { return 1; }

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

get the error in the last estimate of the result

Definition at line 145 of file GSLFunAdapters.cpp.

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

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

get the function itself

Definition at line 139 of file GSLFunAdapters.cpp.

139 { return m_function; }
Genfun::GaudiMathImplementation::GSLFunctionWithModeAndError::m_function
Function m_function
Definition: GSLFunAdapters.h:161

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

Definition at line 142 of file GSLFunAdapters.h.

142 { return true; }

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

get the current mode

Definition at line 141 of file GSLFunAdapters.cpp.

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

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

the main method

Definition at line 117 of file GSLFunAdapters.cpp.

118 {
119 ( *m_function )( x, *m_mode, m_result.get() );
120 return m_result->val;
121 }
Genfun::GaudiMathImplementation::GSLFunctionWithModeAndError::m_mode
std::unique_ptr< gsl_mode_t > m_mode
Definition: GSLFunAdapters.h:162
Genfun::GaudiMathImplementation::GSLFunctionWithModeAndError::m_result
std::unique_ptr< gsl_sf_result > m_result
Definition: GSLFunAdapters.h:163
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 129 of file GSLFunAdapters.cpp.

130 {
131 if ( i >= 1 ) {
132 const AbsFunction& aux = GaudiMath::Constant( 0, 1 );
133 return Genfun::FunctionNoop( &aux );
134 };
135 const AbsFunction& aux = GaudiMath::Derivative( *this, i );
136 return Genfun::FunctionNoop( &aux );
137 }
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::GSLFunctionWithModeAndError::result | ( |  | ) | const

get the last evaluated result

Definition at line 143 of file GSLFunAdapters.cpp.

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

## Member Data Documentation

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

Definition at line 161 of file GSLFunAdapters.h.

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

Definition at line 162 of file GSLFunAdapters.h.

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

Definition at line 163 of file GSLFunAdapters.h.

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

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