diff --git a/src/java/org/apache/commons/math/optimization/MultivariateRealOptimizer.java b/src/java/org/apache/commons/math/optimization/MultivariateRealOptimizer.java index 6f55c9916..ed71a8d92 100644 --- a/src/java/org/apache/commons/math/optimization/MultivariateRealOptimizer.java +++ b/src/java/org/apache/commons/math/optimization/MultivariateRealOptimizer.java @@ -37,16 +37,21 @@ public interface MultivariateRealOptimizer { */ void setMaxIterations(int maxIterations); - /** Set the maximal number of evaluations of the algorithm. - * @param maxEvaluations maximal number of function calls - */ - void setMaxEvaluations(int maxEvaluations); - /** Get the maximal number of iterations of the algorithm. * @return maximal number of iterations */ int getMaxIterations(); + /** Set the maximal number of functions evaluations. + * @param maxEvaluations maximal number of function evaluations + */ + void setMaxEvaluations(int maxEvaluations); + + /** Get the maximal number of functions evaluations. + * @return maximal number of functions evaluations + */ + int getMaxEvaluations(); + /** Get the number of iterations realized by the algorithm. *
* The number of evaluations corresponds to the last call to the diff --git a/src/java/org/apache/commons/math/optimization/direct/DirectSearchOptimizer.java b/src/java/org/apache/commons/math/optimization/direct/DirectSearchOptimizer.java index 21b584937..b8dd6a5c9 100644 --- a/src/java/org/apache/commons/math/optimization/direct/DirectSearchOptimizer.java +++ b/src/java/org/apache/commons/math/optimization/direct/DirectSearchOptimizer.java @@ -226,14 +226,19 @@ public abstract class DirectSearchOptimizer implements MultivariateRealOptimizer this.maxIterations = maxIterations; } + /** {@inheritDoc} */ + public int getMaxIterations() { + return maxIterations; + } + /** {@inheritDoc} */ public void setMaxEvaluations(int maxEvaluations) { this.maxEvaluations = maxEvaluations; } /** {@inheritDoc} */ - public int getMaxIterations() { - return maxIterations; + public int getMaxEvaluations() { + return maxEvaluations; } /** {@inheritDoc} */