12 #include "GaudiMath/GaudiMath.h"
13 #include "GaudiMath/Adapters.h"
26 double fun (
const std::vector<double>& x)
28 return 3 * x[0] * x[0] + 5 * x[1] * x[1] + 8;
34 Genfun::Argument arg(myfun.dimensionality());
36 std::string
format(
"x[0]=%6.5f x[1]=%6.5f myfun=%+.10f");
37 format +=
" fun=%+.10f fun-myfun=%+.10f \n" ;
38 std::vector<double> x =
39 std::vector<double>(myfun.dimensionality());
41 for (
double a = 0; a < 3; ++a)
43 for (
double b = 0; b < 3; ++b)
48 printf ( format.c_str() ,
49 x[0], x[1], myfun(arg),
fun(x),
50 fun(x) - myfun(arg) );
GAUDI_API AIDAFunction adapter(const AIDA::IFunction &function)
Genfun::AbsFunction Function
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
double fun(const std::vector< double > &x)