comparison scripts/sparse/cgs.m @ 21634:96518f623c91

Backed out changeset dcf8922b724b
author Mike Miller <mtmiller@octave.org>
date Wed, 20 Apr 2016 11:06:03 -0700
parents dcf8922b724b
children bac0d6f07a3e
comparison
equal deleted inserted replaced
21633:dcf8922b724b 21634:96518f623c91
163 endif 163 endif
164 endfor 164 endfor
165 165
166 if (nargout < 1) 166 if (nargout < 1)
167 if (flag == 0) 167 if (flag == 0)
168 fprintf ("cgs converged at iteration %i to a solution with relative residual %e\n", 168 printf ("cgs converged at iteration %i to a solution with relative residual %e\n",
169 iter, relres); 169 iter, relres);
170 elseif (flag == 3) 170 elseif (flag == 3)
171 fprintf (["cgs stopped at iteration %i without converging to the desired tolerance %e\n", 171 printf (["cgs stopped at iteration %i without converging to the desired tolerance %e\n",
172 "because the method stagnated.\n", 172 "because the method stagnated.\n",
173 "The iterate returned (number %i) has relative residual %e\n"], 173 "The iterate returned (number %i) has relative residual %e\n"],
174 iter, tol, iter, relres); 174 iter, tol, iter, relres);
175 else 175 else
176 fprintf (["cgs stopped at iteration %i without converging to the desired tolerance %e\n", 176 printf (["cgs stopped at iteration %i without converging to the desired tolerance %e\n",
177 "because the maximum number of iterations was reached.\n", 177 "because the maximum number of iterations was reached.\n",
178 "The iterate returned (number %i) has relative residual %e\n"], 178 "The iterate returned (number %i) has relative residual %e\n"],
179 iter, tol, iter, relres); 179 iter, tol, iter, relres);
180 endif 180 endif
181 endif 181 endif