Bug (in an unexplored code path); fixing by comparison with original code.
Added exception to track unexplored path.


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1165656 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gilles Sadowski 2011-09-06 13:05:55 +00:00
parent 13baf52944
commit 67480f06e8
1 changed files with 2 additions and 1 deletions

View File

@ -538,7 +538,7 @@ public class BOBYQAOptimizer
bdtest = -work1.getEntry(j);
}
if (bdtest < bdtol) {
curv = hq.getEntry((j + j * j) / 2 - 1);
curv = hq.getEntry((j + j * j) / 2);
for (int k = 0; k < npt; k++) {
// Computing 2nd power
final double d1 = xpt.getEntry(k, j);
@ -548,6 +548,7 @@ public class BOBYQAOptimizer
if (bdtest < bdtol) {
state = 650; break;
}
throw new PathIsExploredException(); // XXX
}
}
state = 680; break;