9 #include "AIDA/IFunction.h"
15 namespace GaudiMathImplementation
18 FUNCTION_OBJECT_IMP( AdapterIFunction )
23 , m_dim ( fun.dimension() )
24 , m_arg ( fun.dimension() , 0 )
29 , m_fun ( right.m_fun )
30 , m_dim ( right.m_dim )
31 , m_arg ( right.m_arg )
54 return Genfun::FunctionNoop( &aux ) ;
57 return Genfun::FunctionNoop ( &aux ) ;
76 double Adapter2DoubleFunction::operator()
78 {
return m_func ( x , 0 ) ; }
80 double Adapter2DoubleFunction::operator()
81 (
const Genfun::Argument& x )
const
82 {
return m_func ( x[0] , x[1] ) ; }
84 double Adapter2DoubleFunction::operator()
86 const double y )
const
87 {
return m_func ( x , y ) ; }
95 return Genfun::FunctionNoop( &aux ) ;
98 return Genfun::FunctionNoop ( &aux ) ;
117 double Adapter3DoubleFunction::operator()
119 {
return m_func ( x , 0 , 0 ) ; }
121 double Adapter3DoubleFunction::operator()
122 (
const Genfun::Argument& x )
const
123 {
return m_func ( x[0] , x[1] , x[2] ) ; }
125 double Adapter3DoubleFunction::operator()
128 const double z )
const
129 {
return m_func ( x , y , z ) ; }
137 return Genfun::FunctionNoop( &aux ) ;
140 return Genfun::FunctionNoop ( &aux ) ;
160 , m_func2 (
nullptr )
161 , m_func3 (
nullptr )
177 , m_func1 (
nullptr )
179 , m_arg2 (
new double[dim] )
180 , m_func3 (
nullptr )
197 , m_func1 (
nullptr )
198 , m_func2 (
nullptr )
211 , m_DIM ( right.
m_DIM )
219 m_arg2.reset(
new double[m_DIM] );
235 return Genfun::FunctionNoop( &aux ) ;
238 return Genfun::FunctionNoop( &aux );
250 result = (*m_func1) (
value ) ; break ;
254 result = (*m_func2) ( m_arg2.get() ) ; break ;
258 result = (*m_func3) (
m_arg3 ) ; break ;
275 result = (*m_func1) ( argument[0] ) ; break ;
281 result = (*m_func3) (
m_arg3 ) ; break ;
virtual Genfun::Derivative partial(unsigned int i) const
Derivatives.
virtual double operator()(double a) const
virtual ~Adapter2DoubleFunction()
virtual destructor
std::unique_ptr< double[]> m_arg2
virtual Genfun::Derivative partial(unsigned int i) const
Derivatives.
virtual Genfun::Derivative partial(unsigned int i) const
Derivatives.
Genfun::AbsFunction Function
Genfun::GaudiMathImplementation::NumericalDerivative Derivative
virtual Genfun::Derivative partial(unsigned int i) const
Derivatives.
constructor from the trivial function with two argument
std::vector< double > m_arg3
virtual double operator()(double) const
Function value.
virtual ~Adapter3DoubleFunction()
virtual destructor
constructor from the trivial function with two argument
const AIDA::IFunction * m_fun
virtual ~AdapterIFunction()
desctructor
std::vector< double > m_arg
double fun(const std::vector< double > &x)
double(* Function2)(const double *)
double(* Function3)(const std::vector< double > &)
Genfun::GaudiMathImplementation::Constant Constant
constructor from the IFunction ( see AIDA/IFunction.h)