Skip to content

Commit

Permalink
newuoa: handle xtol_abs == NULL
Browse files Browse the repository at this point in the history
  • Loading branch information
aitap committed Apr 27, 2019
1 parent 85f587d commit 73514f5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/algs/newuoa/newuoa.c
Original file line number Diff line number Diff line change
Expand Up @@ -1626,9 +1626,10 @@ static nlopt_result newuob_(int *n, int *npt, double *x,

/* SGJ, 2008: compute rhoend from NLopt stop info */
rhoend = stop->xtol_rel * (*rhobeg);
for (j = 0; j < *n; ++j)
if (rhoend < stop->xtol_abs[j])
rhoend = stop->xtol_abs[j];
if (stop->xtol_abs)
for (j = 0; j < *n; ++j)
if (rhoend < stop->xtol_abs[j])
rhoend = stop->xtol_abs[j];

/* The arguments N, NPT, X, RHOBEG, RHOEND, IPRINT and MAXFUN are identical */
/* to the corresponding arguments in SUBROUTINE NEWUOA. */
Expand Down

0 comments on commit 73514f5

Please sign in to comment.