| The Gaudi Framework v28r2p1 (f1a77ff4)

- 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...
| ~AdapterIFunction () override
| desctructor More...
double | operator() (double a) const override
double | operator() (const Argument &x) const override
unsigned int | dimensionality () const override
bool | hasAnalyticDerivative () const override
| Does this function have an analytic derivative? More...
Genfun::Derivative | partial (unsigned int i) const override
| 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 39 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 18 of file Adapter.cpp.

19 : AbsFunction ( )
20 , m_fun ( &fun )
21 , m_dim ( fun.dimension() )
22 , m_arg ( fun.dimension() , 0 )
23 {}
Genfun::GaudiMathImplementation::AdapterIFunction::m_dim
size_t m_dim
Definition: FunAdapters.h:70
Genfun::GaudiMathImplementation::AdapterIFunction::m_fun
const AIDA::IFunction * m_fun
Definition: FunAdapters.h:69
Genfun::GaudiMathImplementation::AdapterIFunction::m_arg
std::vector< double > m_arg
Definition: FunAdapters.h:71
fun
double fun(const std::vector< double > &x)
Definition: PFuncTest.cpp:26

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

copy constructor

Definition at line 25 of file Adapter.cpp.

26 : AbsFunction ( )
27 , m_fun ( right.m_fun )
28 , m_dim ( right.m_dim )
29 , m_arg ( right.m_arg )
30 {}
std::right
T right(T...args)
Genfun::GaudiMathImplementation::AdapterIFunction::m_dim
size_t m_dim
Definition: FunAdapters.h:70
Genfun::GaudiMathImplementation::AdapterIFunction::m_fun
const AIDA::IFunction * m_fun
Definition: FunAdapters.h:69
Genfun::GaudiMathImplementation::AdapterIFunction::m_arg
std::vector< double > m_arg
Definition: FunAdapters.h:71

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

desctructor

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

## Member Function Documentation

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

Definition at line 58 of file FunAdapters.h.

58 { return m_dim ; }
Genfun::GaudiMathImplementation::AdapterIFunction::m_dim
size_t m_dim
Definition: FunAdapters.h:70

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

Does this function have an analytic derivative?

Definition at line 61 of file FunAdapters.h.

61 { return true ; }

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

Definition at line 34 of file Adapter.cpp.

35 {
36 for ( size_t i = 0; i < m_dim; ++i ) { m_arg[i] = 0.0 ; }
37 m_arg[0] = x ;
38 return m_fun -> value ( m_arg ) ;
39 }
Genfun::GaudiMathImplementation::AdapterIFunction::m_dim
size_t m_dim
Definition: FunAdapters.h:70
Genfun::GaudiMathImplementation::AdapterIFunction::m_fun
const AIDA::IFunction * m_fun
Definition: FunAdapters.h:69
Genfun::GaudiMathImplementation::AdapterIFunction::m_arg
std::vector< double > m_arg
Definition: FunAdapters.h:71

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

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

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

Derivatives.

Definition at line 47 of file Adapter.cpp.

48 {
49 if ( i >= m_dim )
50 {
51 const AbsFunction& aux = GaudiMath::Constant( 0 , m_dim ) ;
52 return Genfun::FunctionNoop( &aux ) ;
53 };
54 const AbsFunction& aux = GaudiMath::Derivative( *this , i ) ;
55 return Genfun::FunctionNoop ( &aux ) ;
56 }
GaudiMath::Derivative
Genfun::GaudiMathImplementation::NumericalDerivative Derivative
Definition: GaudiMath.h:29
Genfun::GaudiMathImplementation::AdapterIFunction::m_dim
size_t m_dim
Definition: FunAdapters.h:70
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 71 of file FunAdapters.h.

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

Definition at line 70 of file FunAdapters.h.

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

Definition at line 69 of file FunAdapters.h.

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

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