| The Gaudi Framework v27r1

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

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Private Member Functions | Private Attributes | List of all members
Genfun::GaudiMathImplementation::AdapterIFunction Class Reference

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

`#include <GaudiMath/Adapters.h>`

Inheritance diagram for Genfun::GaudiMathImplementation::AdapterIFunction:
[legend]
Collaboration diagram for Genfun::GaudiMathImplementation::AdapterIFunction:
[legend]

## Public Member Functions
| AdapterIFunction (const AIDA::IFunction &fun)
| mandatory macro from CLHEP/GenericFunctions More...
| AdapterIFunction (const AdapterIFunction &)
| copy constructor More...
virtual | ~AdapterIFunction ()
| desctructor More...
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? More...
virtual Genfun::Derivative | partial (unsigned int i) const
| Derivatives. More...

## 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 kiril.nosp@m.lm@i.nosp@m.ris1..nosp@m.itep.nosp@m..ru

Date
  2003-08-03

Definition at line 31 of file FunAdapters.h.

## Constructor & Destructor Documentation

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

mandatory macro from CLHEP/GenericFunctions

constructor from AIDA::Function

Parameters

  fun | AIDA function

Definition at line 20 of file Adapter.cpp.

21 : AbsFunction ( )
22 , m_fun ( &fun )
23 , m_dim ( fun.dimension() )
24 , m_arg ( fun.dimension() , 0 )
25 {}
Genfun::GaudiMathImplementation::AdapterIFunction::m_dim
size_t m_dim
Definition: FunAdapters.h:62
Genfun::GaudiMathImplementation::AdapterIFunction::m_fun
const AIDA::IFunction * m_fun
Definition: FunAdapters.h:61
Genfun::GaudiMathImplementation::AdapterIFunction::m_arg
std::vector< double > m_arg
Definition: FunAdapters.h:63
fun
double fun(const std::vector< double > &x)
Definition: PFuncTest.cpp:26

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

copy constructor

Definition at line 27 of file Adapter.cpp.

28 : AbsFunction ( )
29 , m_fun ( right.m_fun )
30 , m_dim ( right.m_dim )
31 , m_arg ( right.m_arg )
32 {}
std::right
T right(T...args)
Genfun::GaudiMathImplementation::AdapterIFunction::m_dim
size_t m_dim
Definition: FunAdapters.h:62
Genfun::GaudiMathImplementation::AdapterIFunction::m_fun
const AIDA::IFunction * m_fun
Definition: FunAdapters.h:61
Genfun::GaudiMathImplementation::AdapterIFunction::m_arg
std::vector< double > m_arg
Definition: FunAdapters.h:63

Genfun::GaudiMathImplementation::AdapterIFunction::~AdapterIFunction | ( |  | ) |
| virtual default

desctructor

Genfun::GaudiMathImplementation::AdapterIFunction::AdapterIFunction | ( |  | ) |
| private

## Member Function Documentation

virtual unsigned int Genfun::GaudiMathImplementation::AdapterIFunction::dimensionality | ( |  | ) | const
| inline virtual

Definition at line 50 of file FunAdapters.h.

50 { return m_dim ; }
Genfun::GaudiMathImplementation::AdapterIFunction::m_dim
size_t m_dim
Definition: FunAdapters.h:62

virtual bool Genfun::GaudiMathImplementation::AdapterIFunction::hasAnalyticDerivative | ( |  | ) | const
| inline virtual

Does this function have an analytic derivative?

Definition at line 53 of file FunAdapters.h.

53 { return true ; }

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

Definition at line 36 of file Adapter.cpp.

37 {
38 for ( size_t i = 0; i < m_dim; ++i ) { m_arg[i] = 0.0 ; }
39 m_arg[0] = x ;
40 return m_fun -> value ( m_arg ) ;
41 }
Genfun::GaudiMathImplementation::AdapterIFunction::m_dim
size_t m_dim
Definition: FunAdapters.h:62
dump_component_properties.value
list value
Definition: dump_component_properties.py:12
Genfun::GaudiMathImplementation::AdapterIFunction::m_fun
const AIDA::IFunction * m_fun
Definition: FunAdapters.h:61
Genfun::GaudiMathImplementation::AdapterIFunction::m_arg
std::vector< double > m_arg
Definition: FunAdapters.h:63
ana.i
list i
Definition: ana.py:128

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

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

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

Derivatives.

Definition at line 49 of file Adapter.cpp.

50 {
51 if ( i >= m_dim )
52 {
53 const AbsFunction& aux = GaudiMath::Constant( 0 , m_dim ) ;
54 return Genfun::FunctionNoop( &aux ) ;
55 };
56 const AbsFunction& aux = GaudiMath::Derivative( *this , i ) ;
57 return Genfun::FunctionNoop ( &aux ) ;
58 }
GaudiMath::Derivative
Genfun::GaudiMathImplementation::NumericalDerivative Derivative
Definition: GaudiMath.h:29
Genfun::GaudiMathImplementation::AdapterIFunction::m_dim
size_t m_dim
Definition: FunAdapters.h:62
ana.i
list i
Definition: ana.py:128
GaudiMath::Constant
Genfun::GaudiMathImplementation::Constant Constant
Definition: GaudiMath.h:27

## Member Data Documentation

std::vector<double> Genfun::GaudiMathImplementation::AdapterIFunction::m_arg
| mutable private

Definition at line 63 of file FunAdapters.h.

size_t Genfun::GaudiMathImplementation::AdapterIFunction::m_dim
| private

Definition at line 62 of file FunAdapters.h.

const AIDA::IFunction* Genfun::GaudiMathImplementation::AdapterIFunction::m_fun
| private

Definition at line 61 of file FunAdapters.h.

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

- GaudiGSL/GaudiMath/FunAdapters.h
- GaudiGSL/src/Lib/Adapter.cpp