| # Gaudi Framework, version v22r4 |

Home |  | Generated: Fri Sep 2 2011

Public Types | Public Member Functions | Private Member Functions | Private Attributes

# Genfun::GaudiMathImplementation::GSLFunctionWithModeAndError Class Reference

`#include <GSLFunAdapters.h>`

List of all members.

## Public Types
typedef int(* | Function )(double, gsl_mode_t, gsl_sf_result *)
| the actual type of the function
## Public Member Functions
| GSLFunctionWithModeAndError (Function fun, const gsl_mode_t &mode)
| mandatory macro from CLHEP/GenericFunctions
| GSLFunctionWithModeAndError (const GSLFunctionWithModeAndError &)
| copy constructor
virtual | ~GSLFunctionWithModeAndError ()
| 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_mode_t & | mode () const
| get the current mode
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
| GSLFunctionWithModeAndError ()
GSLFunctionWithModeAndError & | operator= (const GSLFunctionWithModeAndError &)
## Private Attributes
Function | m_function
gsl_mode_t * | m_mode
gsl_sf_result * | m_result

## Detailed Description

Definition at line 106 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 110 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 143 of file GSLFunAdapters.cpp.

          : AbsFunction()
          , m_function ( function )
          , m_mode     ( new gsl_mode_t() )
          , m_result   ( new gsl_sf_result() )
        {
          *m_mode = mod ;
          m_result -> val = -1.e+10 ;
          m_result -> err = -1.e+10 ;
        }

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

copy constructor

Definition at line 156 of file GSLFunAdapters.cpp.

          : AbsFunction()
          , m_function ( func.m_function     )
          , m_mode     ( new gsl_mode_t ()   )
          , m_result   ( new gsl_sf_result() )
        {
          *m_mode         = *(func.m_mode)         ;
          m_result -> val =   func.m_result -> val ;
          m_result -> err =   func.m_result -> err ;
        }

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

destructor

Definition at line 167 of file GSLFunAdapters.cpp.

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

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

## Member Function Documentation

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

Definition at line 128 of file GSLFunAdapters.h.

    { return    1 ; }

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

get the error in the last estimate of the result

Definition at line 212 of file GSLFunAdapters.cpp.

        { return  m_result -> err ; }

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

get the function itself

Definition at line 200 of file GSLFunAdapters.cpp.

        { return  m_function      ; }

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

Definition at line 127 of file GSLFunAdapters.h.

    { return true ; }

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

get the current mode

Definition at line 204 of file GSLFunAdapters.cpp.

        { return *m_mode          ; }

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

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

the main method

Definition at line 174 of file GSLFunAdapters.cpp.

        {
          (*m_function)( x , *m_mode , m_result ) ;
          return m_result -> val ;
        }

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

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

Definition at line 188 of file GSLFunAdapters.cpp.

        {
          if( i >= 1 )
          {
            const AbsFunction& aux = GaudiMath::Constant( 0 , 1 ) ;
            return Genfun::FunctionNoop( &aux ) ;
          };
          const AbsFunction& aux = GaudiMath::Derivative( *this , i) ;
          return Genfun::FunctionNoop( &aux ) ;
        }

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

get the last evaluated result

Definition at line 208 of file GSLFunAdapters.cpp.

        { return *m_result        ; }

## Member Data Documentation

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

Definition at line 145 of file GSLFunAdapters.h.

gsl_mode_t* Genfun::GaudiMathImplementation::GSLFunctionWithModeAndError::m_mode`[private]`

Definition at line 146 of file GSLFunAdapters.h.

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

Definition at line 147 of file GSLFunAdapters.h.

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

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

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines