| # Gaudi Framework, version v21r7 |

Home |  | Generated: 22 Jan 2010

# Genfun::GaudiMathImplementation::AdapterIFunction Class Reference

constructor from the IFunction ( see AIDA/IFunction.h) More...

`#include <GaudiMath/Adapters.h>`

Collaboration diagram for Genfun::GaudiMathImplementation::AdapterIFunction:

[legend]

List of all members.

## Public Member Functions
| FUNCTION_OBJECT_DEF (AdapterIFunction)
| mandatory macro from CLHEP/GenericFunctions
| AdapterIFunction (const AIDA::IFunction &fun)
| constructor from AIDA::Function
| AdapterIFunction (const AdapterIFunction &)
| copy constructor
virtual | ~AdapterIFunction ()
| desctructor
virtual double | operator() (double a) 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.
## Private Member Functions
| AdapterIFunction ()
AdapterIFunction & | operator= (const AdapterIFunction &)
## Private Attributes
const AIDA::IFunction * | m_fun
size_t | m_dim
std::vector< double > | m_arg

## Detailed Description

constructor from the IFunction ( see AIDA/IFunction.h)

See also:
  AIDA::IFunction

Author:
  Kirill Miklyaev kirillm@iris1.itep.ru

Date:
  2003-08-03

Definition at line 31 of file FunAdapters.h.

## Constructor & Destructor Documentation

Genfun::GaudiMathImplementation::AdapterIFunction::AdapterIFunction | ( | const AIDA::IFunction & | fun | ) |

constructor from AIDA::Function

Parameters:

  | fun | AIDA function

Definition at line 20 of file Adapter.cpp.

    00021       : AbsFunction ( )
    00022       , m_fun ( &fun  )
    00023       , m_dim ( fun.dimension() )
    00024       , m_arg ( fun.dimension() , 0 )
    00025     {} ;

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

copy constructor

Definition at line 27 of file Adapter.cpp.

    00028       : AbsFunction (  )
    00029       , m_fun ( right.m_fun )
    00030       , m_dim ( right.m_dim )
    00031       , m_arg ( right.m_arg )
    00032     {} ;

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

desctructor

Definition at line 34 of file Adapter.cpp.

    00034 {};

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

## Member Function Documentation

Genfun::GaudiMathImplementation::AdapterIFunction::FUNCTION_OBJECT_DEF | ( | AdapterIFunction |  | ) |

mandatory macro from CLHEP/GenericFunctions

double Genfun::GaudiMathImplementation::AdapterIFunction::operator() | ( | double | a | ) | const`[virtual]`

Definition at line 36 of file Adapter.cpp.

    00037     {
    00038       for ( size_t i = 0; i < m_dim; ++i ) { m_arg[i] = 0.0 ; }
    00039       m_arg[0] = x ;
    00040       return m_fun -> value ( m_arg ) ;
    00041     };

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

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

Definition at line 50 of file FunAdapters.h.

    00050 { return m_dim ; }

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

Does this function have an analytic derivative?

Definition at line 53 of file FunAdapters.h.

    00053 { return true ; }

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

Derivatives.

Definition at line 49 of file Adapter.cpp.

    00050     {
    00051       if ( i >= m_dim )
    00052       {
    00053         const AbsFunction& aux = GaudiMath::Constant( 0 , m_dim  ) ;
    00054         return Genfun::FunctionNoop( &aux ) ;
    00055       };
    00056       const AbsFunction& aux = GaudiMath::Derivative( *this , i ) ;
    00057       return Genfun::FunctionNoop ( &aux ) ;
    00058     };

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

## Member Data Documentation

const AIDA::IFunction* Genfun::GaudiMathImplementation::AdapterIFunction::m_fun`[private]`

Definition at line 61 of file FunAdapters.h.

size_t Genfun::GaudiMathImplementation::AdapterIFunction::m_dim`[private]`

Definition at line 62 of file FunAdapters.h.

std::vector<double> Genfun::GaudiMathImplementation::AdapterIFunction::m_arg`[mutable, private]`

Definition at line 63 of file FunAdapters.h.

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

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