10 #include "AIDA/IFunction.h"
16 namespace GaudiMathImplementation
19 FUNCTION_OBJECT_IMP( AdapterIFunction )
24 , m_dim ( fun.dimension() )
25 , m_arg ( fun.dimension() , 0 )
30 , m_fun ( right.m_fun )
31 , m_dim ( right.m_dim )
32 , m_arg ( right.m_arg )
55 return Genfun::FunctionNoop( &aux ) ;
58 return Genfun::FunctionNoop ( &aux ) ;
77 double Adapter2DoubleFunction::operator()
79 {
return m_func ( x , 0 ) ; }
81 double Adapter2DoubleFunction::operator()
82 (
const Genfun::Argument& x )
const
83 {
return m_func ( x[0] , x[1] ) ; }
85 double Adapter2DoubleFunction::operator()
87 const double y )
const
88 {
return m_func ( x , y ) ; }
96 return Genfun::FunctionNoop( &aux ) ;
99 return Genfun::FunctionNoop ( &aux ) ;
118 double Adapter3DoubleFunction::operator()
120 {
return m_func ( x , 0 , 0 ) ; }
122 double Adapter3DoubleFunction::operator()
123 (
const Genfun::Argument& x )
const
124 {
return m_func ( x[0] , x[1] , x[2] ) ; }
126 double Adapter3DoubleFunction::operator()
129 const double z )
const
130 {
return m_func ( x , y , z ) ; }
138 return Genfun::FunctionNoop( &aux ) ;
141 return Genfun::FunctionNoop ( &aux ) ;
186 m_arg2 =
new double[dim];
217 , m_DIM ( right.
m_DIM )
226 std::memcpy(m_arg2, right.
m_arg2, m_DIM);
246 return Genfun::FunctionNoop( &aux ) ;
249 return Genfun::FunctionNoop( &aux );
261 result = (*m_func1) ( value ) ; break ;
265 result = (*m_func2) (
m_arg2 ) ; break ;
269 result = (*m_func3) (
m_arg3 ) ; break ;
286 result = (*m_func1) ( argument[0] ) ; break ;
292 result = (*m_func3) (
m_arg3 ) ; break ;