| # Gaudi Framework, version v21r11 |

Home |  | Generated: 30 Sep 2010

# Genfun::GaudiMathImplementation::Adapter2DoubleFunction Class Reference

constructor from the trivial function with two argument More...

`#include <GaudiMath/Adapters.h>`

List of all members.

## Public Types
typedef double(* | Function )(const double, const double)
| the actual type of the function "to be adapted"
## Public Member Functions
| Adapter2DoubleFunction (Function func)
| mandatory macro from CLHEP/GenericFunctions
| Adapter2DoubleFunction (const Adapter2DoubleFunction &)
| copy coinstructor
virtual | ~Adapter2DoubleFunction ()
| virtual destructor
virtual double | operator() (double x) const
virtual double | operator() (const Argument &x) const
virtual unsigned int | dimensionality () const
virtual bool | hasAnalyticDerivative () const
| Does this function have an analytic derivative?
virtual Genfun::Derivative | partial (unsigned int i) const
| Derivatives.
double | operator() (const double x, const double y) const
## Private Member Functions
| Adapter2DoubleFunction ()
Adapter2DoubleFunction & | operator= (const Adapter2DoubleFunction &)
## Private Attributes
Function | m_func

## Detailed Description

constructor from the trivial function with two argument

      double func( const double , const double ) ;

      const AbsFuction& fun = Adapter2DoubleFunction( fun ) ;

      // evaluate the function in point (1,2):
      Argument arg(2) ;
      arg[0] = 1 ;
      arg[1] = 2 ;

      double value = fun( arg ) ;

Parameters:

  | func | pointer to trivial function

Author:
  Kirill Miklyaev kirillm@iris1.itep.ru

  Vanya BELYAEV Ivan.Belyaev@itep.ru

Date:
  2003-08-03

Definition at line 91 of file FunAdapters.h.

## Member Typedef Documentation

typedef double(* Genfun::GaudiMathImplementation::Adapter2DoubleFunction::Function)(const double, const double)

the actual type of the function "to be adapted"

## Constructor & Destructor Documentation

Genfun::GaudiMathImplementation::Adapter2DoubleFunction::Adapter2DoubleFunction | ( | Adapter2DoubleFunction::Function | func | ) |

mandatory macro from CLHEP/GenericFunctions

constructor

Definition at line 63 of file Adapter.cpp.

    00064       : AbsFunction (       )
    00065       , m_func      ( func  )
    00066     {}

Genfun::GaudiMathImplementation::Adapter2DoubleFunction::Adapter2DoubleFunction | ( | const Adapter2DoubleFunction & | right | ) |

copy coinstructor

Definition at line 69 of file Adapter.cpp.

    00070       : AbsFunction (              )
    00071       , m_func    ( right.m_func )
    00072     {}

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

virtual destructor

Definition at line 74 of file Adapter.cpp.

    00074 {}

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

## Member Function Documentation

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

Definition at line 77 of file Adapter.cpp.

    00078     { return m_func ( x , 0 ) ; }

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

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

Definition at line 112 of file FunAdapters.h.

    00112 { return 2    ; }

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

Does this function have an analytic derivative?

Definition at line 114 of file FunAdapters.h.

    00114 { return true ; }

Genfun::Derivative Genfun::GaudiMathImplementation::Adapter2DoubleFunction::partial | ( | unsigned int | i | ) | const`[virtual]`

Derivatives.

Definition at line 90 of file Adapter.cpp.

    00091     {
    00092       if ( i >= 2  )
    00093       {
    00094         const AbsFunction& aux = GaudiMath::Constant( 0 , 2 ) ;
    00095         return Genfun::FunctionNoop( &aux ) ;
    00096       };
    00097       const AbsFunction& aux = GaudiMath::Derivative( *this , i ) ;
    00098       return Genfun::FunctionNoop ( &aux ) ;
    00099     }

double Genfun::GaudiMathImplementation::Adapter2DoubleFunction::operator() | ( | const double | x,
|  | const double | y |
| ) |  |  | const

Definition at line 85 of file Adapter.cpp.

    00087     { return m_func ( x , y ) ; }

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

## Member Data Documentation

Function Genfun::GaudiMathImplementation::Adapter2DoubleFunction::m_func`[private]`

Definition at line 125 of file FunAdapters.h.

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

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v21r11/GaudiGSL/GaudiMath/FunAdapters.h
- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v21r11/GaudiGSL/src/Lib/Adapter.cpp