| The Gaudi Framework v29r0 (ff2e7097)

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

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

Public 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 &)=default
| copy constructor 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...
AdapterIFunction & | operator= (const AdapterIFunction &)=delete

## Private Attributes
const AIDA::IFunction * | m_fun
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 101 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 19 of file Adapter.cpp.

19 : m_fun( &fun ), m_arg( fun.dimension(), 0 ) {}
Genfun::GaudiMathImplementation::AdapterIFunction::m_fun
const AIDA::IFunction * m_fun
Definition: FunAdapters.h:128
Genfun::GaudiMathImplementation::AdapterIFunction::m_arg
std::vector< double > m_arg
Definition: FunAdapters.h:129
fun
double fun(const std::vector< double > &x)
Definition: PFuncTest.cpp:26

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

copy constructor

## Member Function Documentation

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

Definition at line 118 of file FunAdapters.h.

118 { return m_arg.size(); }
std::vector::size
T size(T...args)
Genfun::GaudiMathImplementation::AdapterIFunction::m_arg
std::vector< double > m_arg
Definition: FunAdapters.h:129

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

Does this function have an analytic derivative?

Definition at line 121 of file FunAdapters.h.

121 { return true; }

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

Definition at line 21 of file Adapter.cpp.

22 {
23 assert( begin( m_arg ) != end( m_arg ) );
24 m_arg[0] = x;
25 std::fill( std::next( begin( m_arg ) ), end( m_arg ), 0.0 );
26 return m_fun->value( m_arg );
27 }
begin
auto begin(reverse_wrapper< T > &w)
Definition: reverse.h:58
std::next
T next(T...args)
end
auto end(reverse_wrapper< T > &w)
Definition: reverse.h:64
Genfun::GaudiMathImplementation::AdapterIFunction::m_fun
const AIDA::IFunction * m_fun
Definition: FunAdapters.h:128
Genfun::GaudiMathImplementation::AdapterIFunction::m_arg
std::vector< double > m_arg
Definition: FunAdapters.h:129
std::fill
T fill(T...args)

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

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

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

Derivatives.

Definition at line 37 of file Adapter.cpp.

38 {
39 if ( i >= m_arg.size() ) {
40 const AbsFunction& aux = GaudiMath::Constant( 0, m_arg.size() );
41 return Genfun::FunctionNoop( &aux );
42 };
43 const AbsFunction& aux = GaudiMath::Derivative( *this, i );
44 return Genfun::FunctionNoop( &aux );
45 }
GaudiMath::Derivative
Genfun::GaudiMathImplementation::NumericalDerivative Derivative
Definition: GaudiMath.h:27
std::vector::size
T size(T...args)
Genfun::GaudiMathImplementation::AdapterIFunction::m_arg
std::vector< double > m_arg
Definition: FunAdapters.h:129
GaudiMath::Constant
Genfun::GaudiMathImplementation::Constant Constant
Definition: GaudiMath.h:26

## Member Data Documentation

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

Definition at line 129 of file FunAdapters.h.

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

Definition at line 128 of file FunAdapters.h.

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

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