MATH-621
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:
parent
13baf52944
commit
67480f06e8
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue