diff --git a/src/main/java/org/apache/commons/math/optimization/BaseMultiStartMultivariateVectorialOptimizer.java b/src/main/java/org/apache/commons/math/optimization/BaseMultivariateVectorMultiStartOptimizer.java similarity index 95% rename from src/main/java/org/apache/commons/math/optimization/BaseMultiStartMultivariateVectorialOptimizer.java rename to src/main/java/org/apache/commons/math/optimization/BaseMultivariateVectorMultiStartOptimizer.java index 4b2c49671..1d1bb3134 100644 --- a/src/main/java/org/apache/commons/math/optimization/BaseMultiStartMultivariateVectorialOptimizer.java +++ b/src/main/java/org/apache/commons/math/optimization/BaseMultivariateVectorMultiStartOptimizer.java @@ -33,17 +33,17 @@ import org.apache.commons.math.random.RandomVectorGenerator; * * This interface is mainly intended to enforce the internal coherence of * Commons-Math. Users of the API are advised to base their code on - * {@link MultiStartDifferentiableMultivariateVectorialOptimizer}. + * {@link DifferentiableMultivariateVectorMultiStartOptimizer}. * * @param Type of the objective function to be optimized. * * @version $Id$ * @since 3.0 */ -public class BaseMultiStartMultivariateVectorialOptimizer - implements BaseMultivariateVectorialOptimizer { +public class BaseMultivariateVectorMultiStartOptimizer + implements BaseMultivariateVectorOptimizer { /** Underlying classical optimizer. */ - private final BaseMultivariateVectorialOptimizer optimizer; + private final BaseMultivariateVectorOptimizer optimizer; /** Maximal number of evaluations allowed. */ private int maxEvaluations; /** Number of evaluations already performed for all starts. */ @@ -67,7 +67,7 @@ public class BaseMultiStartMultivariateVectorialOptimizer optimizer, + protected BaseMultivariateVectorMultiStartOptimizer(final BaseMultivariateVectorOptimizer optimizer, final int starts, final RandomVectorGenerator generator) { if (optimizer == null || diff --git a/src/main/java/org/apache/commons/math/optimization/BaseMultivariateVectorialOptimizer.java b/src/main/java/org/apache/commons/math/optimization/BaseMultivariateVectorOptimizer.java similarity index 95% rename from src/main/java/org/apache/commons/math/optimization/BaseMultivariateVectorialOptimizer.java rename to src/main/java/org/apache/commons/math/optimization/BaseMultivariateVectorOptimizer.java index 6c3c179b4..28d7ef947 100644 --- a/src/main/java/org/apache/commons/math/optimization/BaseMultivariateVectorialOptimizer.java +++ b/src/main/java/org/apache/commons/math/optimization/BaseMultivariateVectorOptimizer.java @@ -24,7 +24,7 @@ import org.apache.commons.math.analysis.MultivariateVectorFunction; * Commons-Math. Users of the API are advised to base their code on * the following interfaces: *
    - *
  • {@link org.apache.commons.math.optimization.DifferentiableMultivariateVectorialOptimizer}
  • + *
  • {@link org.apache.commons.math.optimization.DifferentiableMultivariateVectorOptimizer}
  • *
* * @param Type of the objective function to be optimized. @@ -32,7 +32,7 @@ import org.apache.commons.math.analysis.MultivariateVectorFunction; * @version $Id$ * @since 3.0 */ -public interface BaseMultivariateVectorialOptimizer +public interface BaseMultivariateVectorOptimizer extends BaseOptimizer { /** * Optimize an objective function. diff --git a/src/main/java/org/apache/commons/math/optimization/BaseOptimizer.java b/src/main/java/org/apache/commons/math/optimization/BaseOptimizer.java index b48387043..1d01368bc 100644 --- a/src/main/java/org/apache/commons/math/optimization/BaseOptimizer.java +++ b/src/main/java/org/apache/commons/math/optimization/BaseOptimizer.java @@ -24,7 +24,7 @@ package org.apache.commons.math.optimization; *
    *
  • {@link org.apache.commons.math.optimization.MultivariateRealOptimizer}
  • *
  • {@link org.apache.commons.math.optimization.DifferentiableMultivariateRealOptimizer}
  • - *
  • {@link org.apache.commons.math.optimization.DifferentiableMultivariateVectorialOptimizer}
  • + *
  • {@link org.apache.commons.math.optimization.DifferentiableMultivariateVectorOptimizer}
  • *
  • {@link org.apache.commons.math.optimization.univariate.UnivariateRealOptimizer}
  • *
* diff --git a/src/main/java/org/apache/commons/math/optimization/DifferentiableMultivariateRealOptimizer.java b/src/main/java/org/apache/commons/math/optimization/DifferentiableMultivariateRealOptimizer.java index 387a39c46..05a6a2bcd 100644 --- a/src/main/java/org/apache/commons/math/optimization/DifferentiableMultivariateRealOptimizer.java +++ b/src/main/java/org/apache/commons/math/optimization/DifferentiableMultivariateRealOptimizer.java @@ -27,7 +27,7 @@ import org.apache.commons.math.analysis.DifferentiableMultivariateFunction; * maximize or minimize} an objective function. * * @see MultivariateRealOptimizer - * @see DifferentiableMultivariateVectorialOptimizer + * @see DifferentiableMultivariateVectorOptimizer * * @version $Id$ * @since 2.0 diff --git a/src/main/java/org/apache/commons/math/optimization/MultiStartDifferentiableMultivariateVectorialOptimizer.java b/src/main/java/org/apache/commons/math/optimization/DifferentiableMultivariateVectorMultiStartOptimizer.java similarity index 82% rename from src/main/java/org/apache/commons/math/optimization/MultiStartDifferentiableMultivariateVectorialOptimizer.java rename to src/main/java/org/apache/commons/math/optimization/DifferentiableMultivariateVectorMultiStartOptimizer.java index b53cf7238..a30d43b5c 100644 --- a/src/main/java/org/apache/commons/math/optimization/MultiStartDifferentiableMultivariateVectorialOptimizer.java +++ b/src/main/java/org/apache/commons/math/optimization/DifferentiableMultivariateVectorMultiStartOptimizer.java @@ -21,7 +21,7 @@ import org.apache.commons.math.analysis.DifferentiableMultivariateVectorFunction import org.apache.commons.math.random.RandomVectorGenerator; /** - * Special implementation of the {@link DifferentiableMultivariateVectorialOptimizer} + * Special implementation of the {@link DifferentiableMultivariateVectorOptimizer} * interface addind multi-start features to an existing optimizer. * * This class wraps a classical optimizer to use it several times in @@ -31,9 +31,9 @@ import org.apache.commons.math.random.RandomVectorGenerator; * @version $Id$ * @since 2.0 */ -public class MultiStartDifferentiableMultivariateVectorialOptimizer - extends BaseMultiStartMultivariateVectorialOptimizer - implements DifferentiableMultivariateVectorialOptimizer { +public class DifferentiableMultivariateVectorMultiStartOptimizer + extends BaseMultivariateVectorMultiStartOptimizer + implements DifferentiableMultivariateVectorOptimizer { /** * Create a multi-start optimizer from a single-start optimizer. * @@ -43,8 +43,8 @@ public class MultiStartDifferentiableMultivariateVectorialOptimizer * equal to 1. * @param generator Random vector generator to use for restarts. */ - public MultiStartDifferentiableMultivariateVectorialOptimizer( - final DifferentiableMultivariateVectorialOptimizer optimizer, + public DifferentiableMultivariateVectorMultiStartOptimizer( + final DifferentiableMultivariateVectorOptimizer optimizer, final int starts, final RandomVectorGenerator generator) { super(optimizer, starts, generator); diff --git a/src/main/java/org/apache/commons/math/optimization/DifferentiableMultivariateVectorialOptimizer.java b/src/main/java/org/apache/commons/math/optimization/DifferentiableMultivariateVectorOptimizer.java similarity index 88% rename from src/main/java/org/apache/commons/math/optimization/DifferentiableMultivariateVectorialOptimizer.java rename to src/main/java/org/apache/commons/math/optimization/DifferentiableMultivariateVectorOptimizer.java index 431983943..bb7811988 100644 --- a/src/main/java/org/apache/commons/math/optimization/DifferentiableMultivariateVectorialOptimizer.java +++ b/src/main/java/org/apache/commons/math/optimization/DifferentiableMultivariateVectorOptimizer.java @@ -27,5 +27,5 @@ import org.apache.commons.math.analysis.DifferentiableMultivariateVectorFunction * @version $Id$ * @since 3.0 */ -public interface DifferentiableMultivariateVectorialOptimizer - extends BaseMultivariateVectorialOptimizer {} +public interface DifferentiableMultivariateVectorOptimizer + extends BaseMultivariateVectorOptimizer {} diff --git a/src/main/java/org/apache/commons/math/optimization/MultivariateRealOptimizer.java b/src/main/java/org/apache/commons/math/optimization/MultivariateRealOptimizer.java index 59dc88198..8146a6b0c 100644 --- a/src/main/java/org/apache/commons/math/optimization/MultivariateRealOptimizer.java +++ b/src/main/java/org/apache/commons/math/optimization/MultivariateRealOptimizer.java @@ -26,7 +26,7 @@ import org.apache.commons.math.analysis.MultivariateFunction; * maximize or minimize} an objective function.

* * @see DifferentiableMultivariateRealOptimizer - * @see DifferentiableMultivariateVectorialOptimizer + * @see DifferentiableMultivariateVectorOptimizer * @version $Id$ * @since 2.0 */ diff --git a/src/main/java/org/apache/commons/math/optimization/VectorialConvergenceChecker.java b/src/main/java/org/apache/commons/math/optimization/VectorialConvergenceChecker.java index ff1fec0e1..18840a58a 100644 --- a/src/main/java/org/apache/commons/math/optimization/VectorialConvergenceChecker.java +++ b/src/main/java/org/apache/commons/math/optimization/VectorialConvergenceChecker.java @@ -18,7 +18,7 @@ package org.apache.commons.math.optimization; /** This interface specifies how to check if a {@link - * DifferentiableMultivariateVectorialOptimizer optimization algorithm} has converged. + * DifferentiableMultivariateVectorOptimizer optimization algorithm} has converged. * *

Deciding if convergence has been reached is a problem-dependent issue. The * user should provide a class implementing this interface to allow the optimization diff --git a/src/main/java/org/apache/commons/math/optimization/direct/BaseAbstractVectorialOptimizer.java b/src/main/java/org/apache/commons/math/optimization/direct/BaseAbstractVectorialOptimizer.java index 12a9c3b5a..290f63f6a 100644 --- a/src/main/java/org/apache/commons/math/optimization/direct/BaseAbstractVectorialOptimizer.java +++ b/src/main/java/org/apache/commons/math/optimization/direct/BaseAbstractVectorialOptimizer.java @@ -23,7 +23,7 @@ import org.apache.commons.math.exception.TooManyEvaluationsException; import org.apache.commons.math.exception.DimensionMismatchException; import org.apache.commons.math.exception.NullArgumentException; import org.apache.commons.math.analysis.MultivariateVectorFunction; -import org.apache.commons.math.optimization.BaseMultivariateVectorialOptimizer; +import org.apache.commons.math.optimization.BaseMultivariateVectorOptimizer; import org.apache.commons.math.optimization.ConvergenceChecker; import org.apache.commons.math.optimization.VectorialPointValuePair; import org.apache.commons.math.optimization.SimpleVectorialValueChecker; @@ -39,7 +39,7 @@ import org.apache.commons.math.optimization.SimpleVectorialValueChecker; * @since 3.0 */ public abstract class BaseAbstractVectorialOptimizer - implements BaseMultivariateVectorialOptimizer { + implements BaseMultivariateVectorOptimizer { /** Evaluations counter. */ protected final Incrementor evaluations = new Incrementor(); /** Convergence checker. */ diff --git a/src/main/java/org/apache/commons/math/optimization/fitting/CurveFitter.java b/src/main/java/org/apache/commons/math/optimization/fitting/CurveFitter.java index 100376dc6..510a68651 100644 --- a/src/main/java/org/apache/commons/math/optimization/fitting/CurveFitter.java +++ b/src/main/java/org/apache/commons/math/optimization/fitting/CurveFitter.java @@ -23,7 +23,7 @@ import java.util.List; import org.apache.commons.math.analysis.DifferentiableMultivariateVectorFunction; import org.apache.commons.math.analysis.ParametricUnivariateFunction; import org.apache.commons.math.analysis.MultivariateMatrixFunction; -import org.apache.commons.math.optimization.DifferentiableMultivariateVectorialOptimizer; +import org.apache.commons.math.optimization.DifferentiableMultivariateVectorOptimizer; import org.apache.commons.math.optimization.VectorialPointValuePair; /** Fitter for parametric univariate real functions y = f(x). @@ -41,14 +41,14 @@ import org.apache.commons.math.optimization.VectorialPointValuePair; */ public class CurveFitter { /** Optimizer to use for the fitting. */ - private final DifferentiableMultivariateVectorialOptimizer optimizer; + private final DifferentiableMultivariateVectorOptimizer optimizer; /** Observed points. */ private final List observations; /** Simple constructor. * @param optimizer optimizer to use for the fitting */ - public CurveFitter(final DifferentiableMultivariateVectorialOptimizer optimizer) { + public CurveFitter(final DifferentiableMultivariateVectorOptimizer optimizer) { this.optimizer = optimizer; observations = new ArrayList(); } diff --git a/src/main/java/org/apache/commons/math/optimization/fitting/GaussianFitter.java b/src/main/java/org/apache/commons/math/optimization/fitting/GaussianFitter.java index 3766f22f7..af4666416 100644 --- a/src/main/java/org/apache/commons/math/optimization/fitting/GaussianFitter.java +++ b/src/main/java/org/apache/commons/math/optimization/fitting/GaussianFitter.java @@ -28,7 +28,7 @@ import org.apache.commons.math.exception.OutOfRangeException; import org.apache.commons.math.exception.ZeroException; import org.apache.commons.math.exception.NotStrictlyPositiveException; import org.apache.commons.math.exception.util.LocalizedFormats; -import org.apache.commons.math.optimization.DifferentiableMultivariateVectorialOptimizer; +import org.apache.commons.math.optimization.DifferentiableMultivariateVectorOptimizer; import org.apache.commons.math.optimization.fitting.CurveFitter; import org.apache.commons.math.optimization.fitting.WeightedObservedPoint; @@ -64,7 +64,7 @@ public class GaussianFitter extends CurveFitter { * * @param optimizer Optimizer to use for the fitting. */ - public GaussianFitter(DifferentiableMultivariateVectorialOptimizer optimizer) { + public GaussianFitter(DifferentiableMultivariateVectorOptimizer optimizer) { super(optimizer); } diff --git a/src/main/java/org/apache/commons/math/optimization/fitting/HarmonicFitter.java b/src/main/java/org/apache/commons/math/optimization/fitting/HarmonicFitter.java index f7cce39b2..928dfa676 100644 --- a/src/main/java/org/apache/commons/math/optimization/fitting/HarmonicFitter.java +++ b/src/main/java/org/apache/commons/math/optimization/fitting/HarmonicFitter.java @@ -17,7 +17,7 @@ package org.apache.commons.math.optimization.fitting; -import org.apache.commons.math.optimization.DifferentiableMultivariateVectorialOptimizer; +import org.apache.commons.math.optimization.DifferentiableMultivariateVectorOptimizer; import org.apache.commons.math.analysis.function.HarmonicOscillator; import org.apache.commons.math.exception.ZeroException; import org.apache.commons.math.exception.NumberIsTooSmallException; @@ -41,7 +41,7 @@ public class HarmonicFitter extends CurveFitter { * Simple constructor. * @param optimizer Optimizer to use for the fitting. */ - public HarmonicFitter(final DifferentiableMultivariateVectorialOptimizer optimizer) { + public HarmonicFitter(final DifferentiableMultivariateVectorOptimizer optimizer) { super(optimizer); } diff --git a/src/main/java/org/apache/commons/math/optimization/fitting/PolynomialFitter.java b/src/main/java/org/apache/commons/math/optimization/fitting/PolynomialFitter.java index 2a037d8af..9ece71930 100644 --- a/src/main/java/org/apache/commons/math/optimization/fitting/PolynomialFitter.java +++ b/src/main/java/org/apache/commons/math/optimization/fitting/PolynomialFitter.java @@ -18,7 +18,7 @@ package org.apache.commons.math.optimization.fitting; import org.apache.commons.math.analysis.polynomials.PolynomialFunction; -import org.apache.commons.math.optimization.DifferentiableMultivariateVectorialOptimizer; +import org.apache.commons.math.optimization.DifferentiableMultivariateVectorOptimizer; /** This class implements a curve fitting specialized for polynomials. *

Polynomial fitting is a very simple case of curve fitting. The @@ -40,7 +40,7 @@ public class PolynomialFitter extends CurveFitter { * @param degree Maximal degree of the polynomial. * @param optimizer Optimizer to use for the fitting. */ - public PolynomialFitter(int degree, final DifferentiableMultivariateVectorialOptimizer optimizer) { + public PolynomialFitter(int degree, final DifferentiableMultivariateVectorOptimizer optimizer) { super(optimizer); this.degree = degree; } diff --git a/src/main/java/org/apache/commons/math/optimization/general/AbstractLeastSquaresOptimizer.java b/src/main/java/org/apache/commons/math/optimization/general/AbstractLeastSquaresOptimizer.java index 3750e00e5..53c232506 100644 --- a/src/main/java/org/apache/commons/math/optimization/general/AbstractLeastSquaresOptimizer.java +++ b/src/main/java/org/apache/commons/math/optimization/general/AbstractLeastSquaresOptimizer.java @@ -26,7 +26,7 @@ import org.apache.commons.math.linear.LUDecomposition; import org.apache.commons.math.linear.DecompositionSolver; import org.apache.commons.math.linear.MatrixUtils; import org.apache.commons.math.optimization.ConvergenceChecker; -import org.apache.commons.math.optimization.DifferentiableMultivariateVectorialOptimizer; +import org.apache.commons.math.optimization.DifferentiableMultivariateVectorOptimizer; import org.apache.commons.math.optimization.VectorialPointValuePair; import org.apache.commons.math.optimization.direct.BaseAbstractVectorialOptimizer; import org.apache.commons.math.util.FastMath; @@ -50,7 +50,7 @@ import org.apache.commons.math.util.FastMath; */ public abstract class AbstractLeastSquaresOptimizer extends BaseAbstractVectorialOptimizer - implements DifferentiableMultivariateVectorialOptimizer { + implements DifferentiableMultivariateVectorOptimizer { /** Singularity threshold (cf. {@link #getCovariances(double)}). */ private static final double DEFAULT_SINGULARITY_THRESHOLD = 1e-14; /** diff --git a/src/main/java/org/apache/commons/math/optimization/package-info.java b/src/main/java/org/apache/commons/math/optimization/package-info.java index 81715cfcd..c61b3b5d4 100644 --- a/src/main/java/org/apache/commons/math/optimization/package-info.java +++ b/src/main/java/org/apache/commons/math/optimization/package-info.java @@ -42,8 +42,8 @@ * DifferentiableMultivariateRealOptimizer} for {@link * org.apache.commons.math.analysis.DifferentiableMultivariateFunction * differentiable multivariate real functions} - *

  • {@link org.apache.commons.math.optimization.DifferentiableMultivariateVectorialOptimizer - * DifferentiableMultivariateVectorialOptimizer} for {@link + *
  • {@link org.apache.commons.math.optimization.DifferentiableMultivariateVectorOptimizer + * DifferentiableMultivariateVectorOptimizer} for {@link * org.apache.commons.math.analysis.DifferentiableMultivariateVectorFunction * differentiable multivariate vectorial functions}
  • * diff --git a/src/test/java/org/apache/commons/math/optimization/MultiStartDifferentiableMultivariateVectorialOptimizerTest.java b/src/test/java/org/apache/commons/math/optimization/DifferentiableMultivariateVectorMultiStartOptimizerTest.java similarity index 93% rename from src/test/java/org/apache/commons/math/optimization/MultiStartDifferentiableMultivariateVectorialOptimizerTest.java rename to src/test/java/org/apache/commons/math/optimization/DifferentiableMultivariateVectorMultiStartOptimizerTest.java index 9e57c282b..e0131ef43 100644 --- a/src/test/java/org/apache/commons/math/optimization/MultiStartDifferentiableMultivariateVectorialOptimizerTest.java +++ b/src/test/java/org/apache/commons/math/optimization/DifferentiableMultivariateVectorMultiStartOptimizerTest.java @@ -93,21 +93,21 @@ import org.junit.Test; * @author Jorge J. More (original fortran minpack tests) * @author Luc Maisonobe (non-minpack tests and minpack tests Java translation) */ -public class MultiStartDifferentiableMultivariateVectorialOptimizerTest { +public class DifferentiableMultivariateVectorMultiStartOptimizerTest { @Test public void testTrivial() { LinearProblem problem = new LinearProblem(new double[][] { { 2 } }, new double[] { 3 }); - DifferentiableMultivariateVectorialOptimizer underlyingOptimizer = + DifferentiableMultivariateVectorOptimizer underlyingOptimizer = new GaussNewtonOptimizer(true, new SimpleVectorialValueChecker(1.0e-6, 1.0e-6)); JDKRandomGenerator g = new JDKRandomGenerator(); g.setSeed(16069223052l); RandomVectorGenerator generator = new UncorrelatedRandomVectorGenerator(1, new GaussianRandomGenerator(g)); - MultiStartDifferentiableMultivariateVectorialOptimizer optimizer = - new MultiStartDifferentiableMultivariateVectorialOptimizer(underlyingOptimizer, + DifferentiableMultivariateVectorMultiStartOptimizer optimizer = + new DifferentiableMultivariateVectorMultiStartOptimizer(underlyingOptimizer, 10, generator); // no optima before first optimization attempt @@ -134,15 +134,15 @@ public class MultiStartDifferentiableMultivariateVectorialOptimizerTest { @Test(expected=TestException.class) public void testNoOptimum() { - DifferentiableMultivariateVectorialOptimizer underlyingOptimizer = + DifferentiableMultivariateVectorOptimizer underlyingOptimizer = new GaussNewtonOptimizer(true, new SimpleVectorialValueChecker(1.0e-6, 1.0e-6)); JDKRandomGenerator g = new JDKRandomGenerator(); g.setSeed(12373523445l); RandomVectorGenerator generator = new UncorrelatedRandomVectorGenerator(1, new GaussianRandomGenerator(g)); - MultiStartDifferentiableMultivariateVectorialOptimizer optimizer = - new MultiStartDifferentiableMultivariateVectorialOptimizer(underlyingOptimizer, + DifferentiableMultivariateVectorMultiStartOptimizer optimizer = + new DifferentiableMultivariateVectorMultiStartOptimizer(underlyingOptimizer, 10, generator); optimizer.optimize(100, new DifferentiableMultivariateVectorFunction() { public MultivariateMatrixFunction jacobian() { diff --git a/src/test/java/org/apache/commons/math/optimization/fitting/PolynomialFitterTest.java b/src/test/java/org/apache/commons/math/optimization/fitting/PolynomialFitterTest.java index b3741ab16..96fa79524 100644 --- a/src/test/java/org/apache/commons/math/optimization/fitting/PolynomialFitterTest.java +++ b/src/test/java/org/apache/commons/math/optimization/fitting/PolynomialFitterTest.java @@ -21,7 +21,7 @@ import java.util.Random; import org.apache.commons.math.analysis.polynomials.PolynomialFunction; import org.apache.commons.math.exception.ConvergenceException; -import org.apache.commons.math.optimization.DifferentiableMultivariateVectorialOptimizer; +import org.apache.commons.math.optimization.DifferentiableMultivariateVectorOptimizer; import org.apache.commons.math.optimization.general.GaussNewtonOptimizer; import org.apache.commons.math.optimization.general.LevenbergMarquardtOptimizer; import org.apache.commons.math.util.FastMath; @@ -89,12 +89,12 @@ public class PolynomialFitterTest { @Test public void testRedundantUnsolvable() { // Gauss-Newton should not be able to solve redundant information - DifferentiableMultivariateVectorialOptimizer optimizer = + DifferentiableMultivariateVectorOptimizer optimizer = new GaussNewtonOptimizer(true); checkUnsolvableProblem(optimizer, false); } - private void checkUnsolvableProblem(DifferentiableMultivariateVectorialOptimizer optimizer, + private void checkUnsolvableProblem(DifferentiableMultivariateVectorOptimizer optimizer, boolean solvable) { Random randomizer = new Random(1248788532l); for (int degree = 0; degree < 10; ++degree) {