Skip to content
Snippets Groups Projects
Commit ec6b597a authored by Elias Pipping's avatar Elias Pipping Committed by Elias Pipping
Browse files

Calculate Ax - b numerically

parent ceaeb2f4
No related branches found
No related tags found
No related merge requests found
......@@ -37,15 +37,8 @@ int main() {
Functional::SmallVector start = b;
start *= 17;
/*
j(x)
= Ax - b
= 17*(6, 9.5) - (1, 2)
= (102 - 1, 161.5 - 2)
*/
Functional::SmallVector analytic_descent;
analytic_descent[0] = -101;
analytic_descent[1] = -159.5;
Functional::SmallVector analytic_descent = b;
A.mmv(start, analytic_descent);
Functional::SmallVector numerical_descent;
J.descentDirection(start, numerical_descent);
assert(two_distance<dim>(numerical_descent, analytic_descent) < 1e-10);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment