34 double temp1 = temp0*temp0;
35 double temp4 = 1./(
x(2));
36 double temp2 = temp4*temp4;
38 double temp3 = 1./
x(0);
40 val = (
x(0))*exp(-temp1*0.5*temp2);
43 grad(1) = val*temp0*
temp2;
44 grad(2) = val*temp1*temp4;
47 hessian(0,1) = grad(1)*temp3;
48 hessian(0,2) = grad(2)*temp3;
49 hessian(1,1) = temp2*(grad(1)*temp0 - val);
50 hessian(1,2) = temp0*(grad(2)*temp2 - 2.*temp4*val);
51 hessian(2,2) = temp1*(grad(2)*temp4 - 3.*temp2*temp2*val);
52 hessian(1,0) = hessian(0,1);
53 hessian(2,0) = hessian(0,2);
54 hessian(2,1) = hessian(1,2);