diff --git a/src/java/org/apache/commons/math/optimization/general/AbstractLeastSquaresOptimizer.java b/src/java/org/apache/commons/math/optimization/general/AbstractLeastSquaresOptimizer.java index 8f096ac68..70af06dbc 100644 --- a/src/java/org/apache/commons/math/optimization/general/AbstractLeastSquaresOptimizer.java +++ b/src/java/org/apache/commons/math/optimization/general/AbstractLeastSquaresOptimizer.java @@ -183,6 +183,7 @@ public abstract class AbstractLeastSquaresOptimizer implements VectorialDifferen protected void updateResidualsAndCost() throws ObjectiveException { + ++objectiveEvaluations; objective = f.objective(variables); if (objective.length != rows) { throw new ObjectiveException("dimension mismatch {0} != {1}",