X-Git-Url: http://gitweb.michael.orlitzky.com/?p=octave.git;a=blobdiff_plain;f=optimization%2Fvanilla_cgm.m;h=3a72b144fc6e623f76e9148817b7f50ec487177d;hp=2c94487a65508e876903343abf457cda853bb929;hb=3b53099a4e07530a498d6aa959defa6f01244154;hpb=5ef96eb244b2a52886a31fc9873db479f52a6483 diff --git a/optimization/vanilla_cgm.m b/optimization/vanilla_cgm.m index 2c94487..3a72b14 100644 --- a/optimization/vanilla_cgm.m +++ b/optimization/vanilla_cgm.m @@ -1,4 +1,4 @@ -function [x, k] = conjugate_gradient_method(A, b, x0, tolerance, max_iterations) +function [x, k] = vanilla_cgm(A, b, x0, tolerance, max_iterations) % % Solve, % @@ -36,8 +36,6 @@ function [x, k] = conjugate_gradient_method(A, b, x0, tolerance, max_iterations) % % All vectors are assumed to be *column* vectors. % - zero_vector = zeros(length(x0), 1); - k = 0; x = x0; % Eschew the 'k' suffix on 'x' for simplicity. rk = A*x - b; % The first residual must be computed the hard way.