MATH-1376

Fixed incorrect iteration number (variable was not updated).

Thanks to Thomas Weise for the report and fix.
This commit is contained in:
Gilles 2016-06-11 20:08:32 +02:00
parent fc9d93db68
commit 66a775c9fe
1 changed files with 2 additions and 1 deletions

View File

@ -159,7 +159,8 @@ public class SimplexOptimizer extends MultivariateOptimizer {
int iteration = 0;
final ConvergenceChecker<PointValuePair> checker = getConvergenceChecker();
while (true) {
if (getIterations() > 0) {
iteration = getIterations();
if (iteration > 0) {
boolean converged = true;
for (int i = 0; i < simplex.getSize(); i++) {
PointValuePair prev = previous[i];