| # Gaudi Framework, version v20r2
Generated: 18 Jul 2008

- Main Page
- Namespaces
- Classes
- Files
- Directories
- Related Pages

- Search for |

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# Genfun::GaudiMathImplementation::GSLFunctionWithError Class Reference

`#include <GSLFunAdapters.h>`

List of all members.

## Detailed Description

Definition at line 31 of file GSLFunAdapters.h.

## Public Types
typedef int(*) | Function (double, gsl_sf_result *)
| the actual type of the function
## Public Member Functions
| FUNCTION_OBJECT_DEF (GSLFunctionWithError)
| mandatory macro from CLHEP/GenericFunctions
| GSLFunctionWithError (Function function)
| constructor with pointer to function
| GSLFunctionWithError (const GSLFunctionWithError &)
| copy constructor
virtual | ~GSLFunctionWithError ()
| destructor
virtual double | operator() (double x) const
| the main method
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
const gsl_sf_result & | result () const
| get the last evaluated result
double | error () const
| get the error in the last estimate of the result
## Private Member Functions
| GSLFunctionWithError ()
GSLFunctionWithError & | operator= (const GSLFunctionWithError &)
## Private Attributes
Function | m_function
gsl_sf_result * | m_result

## Member Typedef Documentation

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

the actual type of the function

Definition at line 35 of file GSLFunAdapters.h.

## Constructor & Destructor Documentation

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

constructor with pointer to function

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

copy constructor

Definition at line 41 of file GSLFunAdapters.cpp.

References m_result.

    00042       : AbsFunction()
    00043       , m_function ( func.m_function    )
    00044       , m_result   ( new gsl_sf_result() )
    00045     {
    00046       m_result -> val = func.m_result -> val ;
    00047       m_result -> err = func.m_result -> err ;
    00048     };

Genfun::GaudiMathImplementation::GSLFunctionWithError::~GSLFunctionWithError | ( |  | ) | `[virtual]`

destructor

Definition at line 50 of file GSLFunAdapters.cpp.

References m_result.

    00051     { if ( 0 != m_result ) { delete m_result  ; } }

Genfun::GaudiMathImplementation::GSLFunctionWithError::GSLFunctionWithError | ( |  | ) | `[private]`

## Member Function Documentation

Genfun::GaudiMathImplementation::GSLFunctionWithError::FUNCTION_OBJECT_DEF | ( | GSLFunctionWithError |  | ) |

mandatory macro from CLHEP/GenericFunctions

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

the main method

Definition at line 54 of file GSLFunAdapters.cpp.

    00055     {
    00056       (*m_function)( x , m_result ) ;
    00057       return m_result -> val ;
    00058     };

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

virtual bool Genfun::GaudiMathImplementation::GSLFunctionWithError::hasAnalyticDerivative | ( |  | ) | const`[inline, virtual]`

Definition at line 49 of file GSLFunAdapters.h.

    00049 { return true ; }

virtual unsigned int Genfun::GaudiMathImplementation::GSLFunctionWithError::dimensionality | ( |  | ) | const`[inline, virtual]`

Definition at line 50 of file GSLFunAdapters.h.

    00050 { return    1 ; }

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

Definition at line 68 of file GSLFunAdapters.cpp.

    00069     {
    00070       if( i >= 1 )
    00071       {
    00072         const AbsFunction& aux = GaudiMath::Constant( 0 , 1 ) ;
    00073         return Genfun::FunctionNoop( &aux ) ;
    00074       };
    00075       const AbsFunction& aux = GaudiMath::Derivative( *this , i) ;
    00076       return Genfun::FunctionNoop( &aux ) ;
    00077     };

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

get the function itself

Definition at line 79 of file GSLFunAdapters.cpp.

References m_function.

    00080     { return  m_function      ; }

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

get the last evaluated result

Definition at line 82 of file GSLFunAdapters.cpp.

References m_result.

    00083     { return *m_result        ; }

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

get the error in the last estimate of the result

Definition at line 85 of file GSLFunAdapters.cpp.

References m_result.

    00086     { return  m_result -> err ; }

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

## Member Data Documentation

Function Genfun::GaudiMathImplementation::GSLFunctionWithError::m_function`[private]`

Definition at line 65 of file GSLFunAdapters.h.

Referenced by function().

gsl_sf_result* Genfun::GaudiMathImplementation::GSLFunctionWithError::m_result`[private]`

Definition at line 66 of file GSLFunAdapters.h.

Referenced by error(), GSLFunctionWithError(), result(), and ~GSLFunctionWithError().

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

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v20r2/GaudiGSL/v6r9/GaudiMath/GSLFunAdapters.h
- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v20r2/GaudiGSL/v6r9/src/Lib/GSLFunAdapters.cpp