diff options
Diffstat (limited to 'lib/Numeric')
-rw-r--r-- | lib/Numeric/GSL/gsl-aux.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Numeric/GSL/gsl-aux.c b/lib/Numeric/GSL/gsl-aux.c index b811ee4..d254705 100644 --- a/lib/Numeric/GSL/gsl-aux.c +++ b/lib/Numeric/GSL/gsl-aux.c | |||
@@ -411,8 +411,9 @@ int minimize(int method, double f(int, double*), double tolsize, int maxit, | |||
411 | for(k=0;k<xin;k++) { | 411 | for(k=0;k<xin;k++) { |
412 | solp[iter*solc+k+3] = gsl_vector_get(s->x,k); | 412 | solp[iter*solc+k+3] = gsl_vector_get(s->x,k); |
413 | } | 413 | } |
414 | status = gsl_multimin_test_size (size, tolsize); | ||
415 | iter++; | 414 | iter++; |
415 | if (status) break; | ||
416 | status = gsl_multimin_test_size (size, tolsize); | ||
416 | } while (status == GSL_CONTINUE && iter < maxit); | 417 | } while (status == GSL_CONTINUE && iter < maxit); |
417 | int i,j; | 418 | int i,j; |
418 | for (i=iter; i<solr; i++) { | 419 | for (i=iter; i<solr; i++) { |
@@ -506,8 +507,9 @@ int minimizeD(int method, double f(int, double*), int df(int, double*, int, doub | |||
506 | for(k=0;k<xin;k++) { | 507 | for(k=0;k<xin;k++) { |
507 | solp[iter*solc+k+2] = gsl_vector_get(s->x,k); | 508 | solp[iter*solc+k+2] = gsl_vector_get(s->x,k); |
508 | } | 509 | } |
509 | status = gsl_multimin_test_gradient (s->gradient, tolgrad); | ||
510 | iter++; | 510 | iter++; |
511 | if (status) break; | ||
512 | status = gsl_multimin_test_gradient (s->gradient, tolgrad); | ||
511 | } while (status == GSL_CONTINUE && iter < maxit); | 513 | } while (status == GSL_CONTINUE && iter < maxit); |
512 | int i,j; | 514 | int i,j; |
513 | for (i=iter; i<solr; i++) { | 515 | for (i=iter; i<solr; i++) { |