lt;
} mixdiff (char & var, fine p, counters i, counters j, point & x)
{h = 0.00001; result = 0; f1 = 0, f2 = 0, f3 = 0, f4 = 0; dx [n]; k = 0; (k = 0; k
} Hessian (char & var, fine p, point & x, Hessian_matrix & H, Determ_Hess_matr & dH)
{i = 0, j = 0; = 0; <
{(j = 0; j
{[i] [j] = mixdiff (var, p, i, j, x); [i] [i] = d_diff (var, p, i, x); << ; "" <
} <
} = H [0] [0] * H [1] [1]-H [0] [1] * H [1] [0]; <<"Визначник матриці Гесса: "<
} step_0 (char & var, counters i, counters j, accuracy & eps, point & x, matrix & D)
{<
cout <<"1.Тестовая функція" <
repeat: <> var; ((var == '1 ') | | (var == '2') | | (var == '3 ')) {;} {cout <
cout <> eps; <
cout <> x [i]; if (i == n-1) {break;}}
// присвоєння виду D = Е (при k = 0)
for (i = 0; i
} step_1 (counters i, counters j, gradient & g, direction & d, matrix & D)
{(i = 0; i
cout <<"Напрямок {d (x) =-D * f '(x)}:" <
for (i = 0; i
} step_2 (char & var, fine p, step & s, point & x, direction & d)
{a = -1000, b = 1000; const1 = 0.381966, const2 = 0.618033; alfa = 0, bett = 0; F1 = 0, F2 = 0; eps = 0.000000001; = a + const1 * (ba); = a + const2 * (ba); (const2 * (ba)> = eps)
{= psy (var, p, alfa, x, d); = psy (var, p, bett, x, d); (F1> F2)
{= alfa; = bett; = a + const2 * (ba);
}
{= bett; = alfa; = a + const1 * (ba);
}