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 ;
virtual Genfun::Derivative partial(unsigned int i) const
Derivatives.
virtual double operator()(double a) const
virtual ~Adapter2DoubleFunction()
virtual destructor
GAUDI_API void fill(AIDA::IHistogram1D *histo, const double value, const double weight=1.0)
simple function to fill AIDA::IHistogram1D objects
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
double(* Function3)(const std::vector< double > &)
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)
virtual ~SimpleFunction()
destructor
double(* Function2)(const double *)
Genfun::GaudiMathImplementation::Constant Constant
constructor from the IFunction ( see AIDA/IFunction.h)