From 0f2ef2d95437498b0f9d1a03e904979bdeca1115 Mon Sep 17 00:00:00 2001 From: Gilles Sadowski Date: Sun, 12 Feb 2012 23:43:48 +0000 Subject: [PATCH] MATH-707 Renamed "SimpleVectorialValueChecker" to "SimpleVectorValueChecker". git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1243370 13f79535-47bb-0310-9956-ffa450edef68 --- ...ker.java => SimpleVectorValueChecker.java} | 6 ++-- .../VectorialConvergenceChecker.java | 2 +- ...seAbstractMultivariateVectorOptimizer.java | 6 ++-- .../AbstractLeastSquaresOptimizer.java | 2 +- .../general/GaussNewtonOptimizer.java | 8 ++--- ...ivariateVectorMultiStartOptimizerTest.java | 4 +-- .../general/GaussNewtonOptimizerTest.java | 36 +++++++++---------- .../LevenbergMarquardtOptimizerTest.java | 4 +-- 8 files changed, 34 insertions(+), 34 deletions(-) rename src/main/java/org/apache/commons/math/optimization/{SimpleVectorialValueChecker.java => SimpleVectorValueChecker.java} (95%) diff --git a/src/main/java/org/apache/commons/math/optimization/SimpleVectorialValueChecker.java b/src/main/java/org/apache/commons/math/optimization/SimpleVectorValueChecker.java similarity index 95% rename from src/main/java/org/apache/commons/math/optimization/SimpleVectorialValueChecker.java rename to src/main/java/org/apache/commons/math/optimization/SimpleVectorValueChecker.java index e54d13976..6d33c5496 100644 --- a/src/main/java/org/apache/commons/math/optimization/SimpleVectorialValueChecker.java +++ b/src/main/java/org/apache/commons/math/optimization/SimpleVectorValueChecker.java @@ -31,12 +31,12 @@ import org.apache.commons.math.util.FastMath; * @version $Id$ * @since 3.0 */ -public class SimpleVectorialValueChecker +public class SimpleVectorValueChecker extends AbstractConvergenceChecker { /** * Build an instance with default thresholds. */ - public SimpleVectorialValueChecker() {} + public SimpleVectorValueChecker() {} /** * Build an instance with specified thresholds. @@ -48,7 +48,7 @@ public class SimpleVectorialValueChecker * @param relativeThreshold relative tolerance threshold * @param absoluteThreshold absolute tolerance threshold */ - public SimpleVectorialValueChecker(final double relativeThreshold, + public SimpleVectorValueChecker(final double relativeThreshold, final double absoluteThreshold) { super(relativeThreshold, absoluteThreshold); } 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 e4026d4ab..3bbfbeaac 100644 --- a/src/main/java/org/apache/commons/math/optimization/VectorialConvergenceChecker.java +++ b/src/main/java/org/apache/commons/math/optimization/VectorialConvergenceChecker.java @@ -24,7 +24,7 @@ package org.apache.commons.math.optimization; * user should provide a class implementing this interface to allow the optimization * algorithm to stop its search according to the problem at hand.

*

For convenience, two implementations that fit simple needs are already provided: - * {@link SimpleVectorialValueChecker} and {@link SimplePointChecker}. The first + * {@link SimpleVectorValueChecker} and {@link SimplePointChecker}. The first * one considers convergence is reached when the objective function value does not * change much anymore, it does not use the point set at all. The second one * considers convergence is reached when the input point set does not change diff --git a/src/main/java/org/apache/commons/math/optimization/direct/BaseAbstractMultivariateVectorOptimizer.java b/src/main/java/org/apache/commons/math/optimization/direct/BaseAbstractMultivariateVectorOptimizer.java index 93a58b789..e7cb5c539 100644 --- a/src/main/java/org/apache/commons/math/optimization/direct/BaseAbstractMultivariateVectorOptimizer.java +++ b/src/main/java/org/apache/commons/math/optimization/direct/BaseAbstractMultivariateVectorOptimizer.java @@ -26,7 +26,7 @@ import org.apache.commons.math.analysis.MultivariateVectorFunction; import org.apache.commons.math.optimization.BaseMultivariateVectorOptimizer; import org.apache.commons.math.optimization.ConvergenceChecker; import org.apache.commons.math.optimization.PointVectorValuePair; -import org.apache.commons.math.optimization.SimpleVectorialValueChecker; +import org.apache.commons.math.optimization.SimpleVectorValueChecker; /** * Base class for implementing optimizers for multivariate scalar functions. @@ -55,11 +55,11 @@ public abstract class BaseAbstractMultivariateVectorOptimizer 0.1); @@ -334,7 +334,7 @@ public class GaussNewtonOptimizerTest { new LinearProblem(new double[][] { { 1, 0 }, { 0, 1 } }, new double[] { -1, 1 }); GaussNewtonOptimizer optimizer - = new GaussNewtonOptimizer(new SimpleVectorialValueChecker(1.0e-6, 1.0e-6)); + = new GaussNewtonOptimizer(new SimpleVectorValueChecker(1.0e-6, 1.0e-6)); PointVectorValuePair optimum = optimizer.optimize(100, problem, problem.target, new double[] { 1, 1 }, new double[] { 0, 0 }); @@ -353,7 +353,7 @@ public class GaussNewtonOptimizerTest { new LinearProblem(new double[][] { { 1, 0 }, { 0, 1 } }, new double[] { -1, 1 }); GaussNewtonOptimizer optimizer - = new GaussNewtonOptimizer(new SimpleVectorialValueChecker(1.0e-6, 1.0e-6)); + = new GaussNewtonOptimizer(new SimpleVectorValueChecker(1.0e-6, 1.0e-6)); PointVectorValuePair optimum = optimizer.optimize(100, problem, problem.target, new double[] { 1, 1 }, new double[] { 0, 0 }); @@ -376,7 +376,7 @@ public class GaussNewtonOptimizerTest { circle.addPoint( 45.0, 97.0); GaussNewtonOptimizer optimizer - = new GaussNewtonOptimizer(new SimpleVectorialValueChecker(1.0e-30, 1.0e-30)); + = new GaussNewtonOptimizer(new SimpleVectorValueChecker(1.0e-30, 1.0e-30)); optimizer.optimize(100, circle, new double[] { 0, 0, 0, 0, 0 }, new double[] { 1, 1, 1, 1, 1 }, @@ -393,7 +393,7 @@ public class GaussNewtonOptimizerTest { circle.addPoint( 45.0, 97.0); GaussNewtonOptimizer optimizer - = new GaussNewtonOptimizer(new SimpleVectorialValueChecker(1.0e-13, 1.0e-13)); + = new GaussNewtonOptimizer(new SimpleVectorValueChecker(1.0e-13, 1.0e-13)); PointVectorValuePair optimum = optimizer.optimize(100, circle, new double[] { 0, 0, 0, 0, 0 }, @@ -419,7 +419,7 @@ public class GaussNewtonOptimizerTest { } GaussNewtonOptimizer optimizer - = new GaussNewtonOptimizer(new SimpleVectorialValueChecker(1.0e-6, 1.0e-6)); + = new GaussNewtonOptimizer(new SimpleVectorValueChecker(1.0e-6, 1.0e-6)); optimizer.optimize(100, circle, target, weights, new double[] { -12, -12 }); } @@ -437,7 +437,7 @@ public class GaussNewtonOptimizerTest { } GaussNewtonOptimizer optimizer - = new GaussNewtonOptimizer(new SimpleVectorialValueChecker(1.0e-6, 1.0e-6)); + = new GaussNewtonOptimizer(new SimpleVectorValueChecker(1.0e-6, 1.0e-6)); PointVectorValuePair optimum = optimizer.optimize(100, circle, target, weights, new double[] { 0, 0 }); diff --git a/src/test/java/org/apache/commons/math/optimization/general/LevenbergMarquardtOptimizerTest.java b/src/test/java/org/apache/commons/math/optimization/general/LevenbergMarquardtOptimizerTest.java index f15caba19..e7e15153b 100644 --- a/src/test/java/org/apache/commons/math/optimization/general/LevenbergMarquardtOptimizerTest.java +++ b/src/test/java/org/apache/commons/math/optimization/general/LevenbergMarquardtOptimizerTest.java @@ -33,7 +33,7 @@ import org.apache.commons.math.analysis.MultivariateMatrixFunction; import org.apache.commons.math.linear.BlockRealMatrix; import org.apache.commons.math.linear.RealMatrix; import org.apache.commons.math.linear.SingularMatrixException; -import org.apache.commons.math.optimization.SimpleVectorialValueChecker; +import org.apache.commons.math.optimization.SimpleVectorValueChecker; import org.apache.commons.math.optimization.PointVectorValuePair; import org.apache.commons.math.util.Precision; import org.apache.commons.math.util.FastMath; @@ -480,7 +480,7 @@ public class LevenbergMarquardtOptimizerTest { circle.addPoint(points[i][0], points[i][1]); } LevenbergMarquardtOptimizer optimizer - = new LevenbergMarquardtOptimizer(new SimpleVectorialValueChecker(1.0e-8, 1.0e-8)); + = new LevenbergMarquardtOptimizer(new SimpleVectorValueChecker(1.0e-8, 1.0e-8)); PointVectorValuePair optimum = optimizer.optimize(100, circle, target, weights, new double[] { -12, -12 }); Point2D.Double center = new Point2D.Double(optimum.getPointRef()[0], optimum.getPointRef()[1]);