lolita
11-05-2007, 04:54 AM
hi!
I'm using the multidimensional conjugate gradient method to find a function minima.
My function is so defined :
DP func(Vec_I_DP &x)
{
double result;
double pi=3.1416;
double interm;
result=cos(pi*(1-exp(-x[0]*(1+0.4/0.25*(x[1]-0.5)*(x[1]-0.5)))));
interm = pow((x[1]-0.5), 4);
result=(2+interm)*(1+result*result);
return result;
}
can u help me to write "dfunc(Vec_I_DP &x, Vec_O_DP &df) ":)
Thanks for your answers
M.
I'm using the multidimensional conjugate gradient method to find a function minima.
My function is so defined :
DP func(Vec_I_DP &x)
{
double result;
double pi=3.1416;
double interm;
result=cos(pi*(1-exp(-x[0]*(1+0.4/0.25*(x[1]-0.5)*(x[1]-0.5)))));
interm = pow((x[1]-0.5), 4);
result=(2+interm)*(1+result*result);
return result;
}
can u help me to write "dfunc(Vec_I_DP &x, Vec_O_DP &df) ":)
Thanks for your answers
M.