MATH-707
Class name change: "MultivariateRealOptimizer" -> "MultivariateOptimizer" "DifferentiableMultivariateRealOptimizer" -> "DifferentiableMultivariateOptimizer" git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1212377 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
5fef93ec7d
commit
e71093b8df
|
@ -24,8 +24,8 @@ import org.apache.commons.math.analysis.MultivariateFunction;
|
|||
* Commons-FastMath. Users of the API are advised to base their code on
|
||||
* the following interfaces:
|
||||
* <ul>
|
||||
* <li>{@link org.apache.commons.math.optimization.MultivariateRealOptimizer}</li>
|
||||
* <li>{@link org.apache.commons.math.optimization.DifferentiableMultivariateRealOptimizer}</li>
|
||||
* <li>{@link org.apache.commons.math.optimization.MultivariateOptimizer}</li>
|
||||
* <li>{@link org.apache.commons.math.optimization.DifferentiableMultivariateOptimizer}</li>
|
||||
* </ul>
|
||||
*
|
||||
* @param <FUNC> Type of the objective function to be optimized.
|
||||
|
|
|
@ -24,8 +24,8 @@ import org.apache.commons.math.analysis.MultivariateFunction;
|
|||
* Commons-FastMath. Users of the API are advised to base their code on
|
||||
* the following interfaces:
|
||||
* <ul>
|
||||
* <li>{@link org.apache.commons.math.optimization.MultivariateRealOptimizer}</li>
|
||||
* <li>{@link org.apache.commons.math.optimization.DifferentiableMultivariateRealOptimizer}</li>
|
||||
* <li>{@link org.apache.commons.math.optimization.MultivariateOptimizer}</li>
|
||||
* <li>{@link org.apache.commons.math.optimization.DifferentiableMultivariateOptimizer}</li>
|
||||
* </ul>
|
||||
*
|
||||
* @param <FUNC> Type of the objective function to be optimized.
|
||||
|
|
|
@ -22,8 +22,8 @@ package org.apache.commons.math.optimization;
|
|||
* Commons-Math. Users of the API are advised to base their code on
|
||||
* the following interfaces:
|
||||
* <ul>
|
||||
* <li>{@link org.apache.commons.math.optimization.MultivariateRealOptimizer}</li>
|
||||
* <li>{@link org.apache.commons.math.optimization.DifferentiableMultivariateRealOptimizer}</li>
|
||||
* <li>{@link org.apache.commons.math.optimization.MultivariateOptimizer}</li>
|
||||
* <li>{@link org.apache.commons.math.optimization.DifferentiableMultivariateOptimizer}</li>
|
||||
* <li>{@link org.apache.commons.math.optimization.DifferentiableMultivariateVectorOptimizer}</li>
|
||||
* <li>{@link org.apache.commons.math.optimization.univariate.UnivariateRealOptimizer}</li>
|
||||
* </ul>
|
||||
|
|
|
@ -21,7 +21,7 @@ import org.apache.commons.math.analysis.DifferentiableMultivariateFunction;
|
|||
import org.apache.commons.math.random.RandomVectorGenerator;
|
||||
|
||||
/**
|
||||
* Special implementation of the {@link DifferentiableMultivariateRealOptimizer}
|
||||
* Special implementation of the {@link DifferentiableMultivariateOptimizer}
|
||||
* interface adding multi-start features to an existing optimizer.
|
||||
*
|
||||
* This class wraps a classical optimizer to use it several times in
|
||||
|
@ -33,7 +33,7 @@ import org.apache.commons.math.random.RandomVectorGenerator;
|
|||
*/
|
||||
public class DifferentiableMultivariateMultiStartOptimizer
|
||||
extends BaseMultivariateMultiStartOptimizer<DifferentiableMultivariateFunction>
|
||||
implements DifferentiableMultivariateRealOptimizer {
|
||||
implements DifferentiableMultivariateOptimizer {
|
||||
/**
|
||||
* Create a multi-start optimizer from a single-start optimizer.
|
||||
*
|
||||
|
@ -43,7 +43,7 @@ public class DifferentiableMultivariateMultiStartOptimizer
|
|||
* equal to 1.
|
||||
* @param generator Random vector generator to use for restarts.
|
||||
*/
|
||||
public DifferentiableMultivariateMultiStartOptimizer(final DifferentiableMultivariateRealOptimizer optimizer,
|
||||
public DifferentiableMultivariateMultiStartOptimizer(final DifferentiableMultivariateOptimizer optimizer,
|
||||
final int starts,
|
||||
final RandomVectorGenerator generator) {
|
||||
super(optimizer, starts, generator);
|
||||
|
|
|
@ -26,11 +26,11 @@ import org.apache.commons.math.analysis.DifferentiableMultivariateFunction;
|
|||
* Optimization algorithms find the input point set that either {@link GoalType
|
||||
* maximize or minimize} an objective function.
|
||||
*
|
||||
* @see MultivariateRealOptimizer
|
||||
* @see MultivariateOptimizer
|
||||
* @see DifferentiableMultivariateVectorOptimizer
|
||||
*
|
||||
* @version $Id$
|
||||
* @since 2.0
|
||||
*/
|
||||
public interface DifferentiableMultivariateRealOptimizer
|
||||
public interface DifferentiableMultivariateOptimizer
|
||||
extends BaseMultivariateOptimizer<DifferentiableMultivariateFunction> {}
|
|
@ -21,7 +21,7 @@ import org.apache.commons.math.analysis.MultivariateFunction;
|
|||
import org.apache.commons.math.random.RandomVectorGenerator;
|
||||
|
||||
/**
|
||||
* Special implementation of the {@link MultivariateRealOptimizer} interface adding
|
||||
* Special implementation of the {@link MultivariateOptimizer} interface adding
|
||||
* multi-start features to an existing optimizer.
|
||||
*
|
||||
* This class wraps a classical optimizer to use it several times in
|
||||
|
@ -33,7 +33,7 @@ import org.apache.commons.math.random.RandomVectorGenerator;
|
|||
*/
|
||||
public class MultivariateMultiStartOptimizer
|
||||
extends BaseMultivariateMultiStartOptimizer<MultivariateFunction>
|
||||
implements MultivariateRealOptimizer {
|
||||
implements MultivariateOptimizer {
|
||||
/**
|
||||
* Create a multi-start optimizer from a single-start optimizer.
|
||||
*
|
||||
|
@ -43,7 +43,7 @@ public class MultivariateMultiStartOptimizer
|
|||
* equal to 1.
|
||||
* @param generator Random vector generator to use for restarts.
|
||||
*/
|
||||
public MultivariateMultiStartOptimizer(final MultivariateRealOptimizer optimizer,
|
||||
public MultivariateMultiStartOptimizer(final MultivariateOptimizer optimizer,
|
||||
final int starts,
|
||||
final RandomVectorGenerator generator) {
|
||||
super(optimizer, starts, generator);
|
||||
|
|
|
@ -25,10 +25,10 @@ import org.apache.commons.math.analysis.MultivariateFunction;
|
|||
* <p>Optimization algorithms find the input point set that either {@link GoalType
|
||||
* maximize or minimize} an objective function.</p>
|
||||
*
|
||||
* @see DifferentiableMultivariateRealOptimizer
|
||||
* @see DifferentiableMultivariateOptimizer
|
||||
* @see DifferentiableMultivariateVectorOptimizer
|
||||
* @version $Id$
|
||||
* @since 2.0
|
||||
*/
|
||||
public interface MultivariateRealOptimizer
|
||||
public interface MultivariateOptimizer
|
||||
extends BaseMultivariateOptimizer<MultivariateFunction> {}
|
|
@ -29,7 +29,7 @@ import org.apache.commons.math.linear.ArrayRealVector;
|
|||
import org.apache.commons.math.linear.RealVector;
|
||||
import org.apache.commons.math.optimization.GoalType;
|
||||
import org.apache.commons.math.optimization.RealPointValuePair;
|
||||
import org.apache.commons.math.optimization.MultivariateRealOptimizer;
|
||||
import org.apache.commons.math.optimization.MultivariateOptimizer;
|
||||
|
||||
/**
|
||||
* Powell's BOBYQA algorithm. This implementation is translated and
|
||||
|
@ -51,7 +51,7 @@ import org.apache.commons.math.optimization.MultivariateRealOptimizer;
|
|||
*/
|
||||
public class BOBYQAOptimizer
|
||||
extends BaseAbstractMultivariateSimpleBoundsOptimizer<MultivariateFunction>
|
||||
implements MultivariateRealOptimizer {
|
||||
implements MultivariateOptimizer {
|
||||
/** Minimum dimension of the problem: {@value} */
|
||||
public static final int MINIMUM_PROBLEM_DIMENSION = 2;
|
||||
/** Default value for {@link #initialTrustRegionRadius}: {@value} . */
|
||||
|
|
|
@ -33,7 +33,7 @@ import org.apache.commons.math.linear.MatrixUtils;
|
|||
import org.apache.commons.math.linear.RealMatrix;
|
||||
import org.apache.commons.math.optimization.ConvergenceChecker;
|
||||
import org.apache.commons.math.optimization.GoalType;
|
||||
import org.apache.commons.math.optimization.MultivariateRealOptimizer;
|
||||
import org.apache.commons.math.optimization.MultivariateOptimizer;
|
||||
import org.apache.commons.math.optimization.RealPointValuePair;
|
||||
import org.apache.commons.math.optimization.SimpleScalarValueChecker;
|
||||
import org.apache.commons.math.random.MersenneTwister;
|
||||
|
@ -82,7 +82,7 @@ import org.apache.commons.math.util.MathArrays;
|
|||
|
||||
public class CMAESOptimizer
|
||||
extends BaseAbstractMultivariateOptimizer<MultivariateFunction>
|
||||
implements MultivariateRealOptimizer {
|
||||
implements MultivariateOptimizer {
|
||||
/** Default value for {@link #checkFeasableCount}: {@value}. */
|
||||
public static final int DEFAULT_CHECKFEASABLECOUNT = 0;
|
||||
/** Default value for {@link #stopFitness}: {@value}. */
|
||||
|
|
|
@ -26,7 +26,7 @@ import org.apache.commons.math.exception.NotStrictlyPositiveException;
|
|||
import org.apache.commons.math.optimization.GoalType;
|
||||
import org.apache.commons.math.optimization.RealPointValuePair;
|
||||
import org.apache.commons.math.optimization.ConvergenceChecker;
|
||||
import org.apache.commons.math.optimization.MultivariateRealOptimizer;
|
||||
import org.apache.commons.math.optimization.MultivariateOptimizer;
|
||||
import org.apache.commons.math.optimization.univariate.BracketFinder;
|
||||
import org.apache.commons.math.optimization.univariate.BrentOptimizer;
|
||||
import org.apache.commons.math.optimization.univariate.UnivariateRealPointValuePair;
|
||||
|
@ -47,7 +47,7 @@ import org.apache.commons.math.optimization.univariate.UnivariateRealPointValueP
|
|||
*/
|
||||
public class PowellOptimizer
|
||||
extends BaseAbstractMultivariateOptimizer<MultivariateFunction>
|
||||
implements MultivariateRealOptimizer {
|
||||
implements MultivariateOptimizer {
|
||||
/**
|
||||
* Minimum relative tolerance.
|
||||
*/
|
||||
|
|
|
@ -25,7 +25,7 @@ import org.apache.commons.math.optimization.GoalType;
|
|||
import org.apache.commons.math.optimization.ConvergenceChecker;
|
||||
import org.apache.commons.math.optimization.RealPointValuePair;
|
||||
import org.apache.commons.math.optimization.SimpleScalarValueChecker;
|
||||
import org.apache.commons.math.optimization.MultivariateRealOptimizer;
|
||||
import org.apache.commons.math.optimization.MultivariateOptimizer;
|
||||
|
||||
/**
|
||||
* This class implements simplex-based direct search optimization.
|
||||
|
@ -85,7 +85,7 @@ import org.apache.commons.math.optimization.MultivariateRealOptimizer;
|
|||
*/
|
||||
public class SimplexOptimizer
|
||||
extends BaseAbstractMultivariateOptimizer<MultivariateFunction>
|
||||
implements MultivariateRealOptimizer {
|
||||
implements MultivariateOptimizer {
|
||||
/** Simplex. */
|
||||
private AbstractSimplex simplex;
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ package org.apache.commons.math.optimization.general;
|
|||
|
||||
import org.apache.commons.math.analysis.DifferentiableMultivariateFunction;
|
||||
import org.apache.commons.math.analysis.MultivariateVectorFunction;
|
||||
import org.apache.commons.math.optimization.DifferentiableMultivariateRealOptimizer;
|
||||
import org.apache.commons.math.optimization.DifferentiableMultivariateOptimizer;
|
||||
import org.apache.commons.math.optimization.GoalType;
|
||||
import org.apache.commons.math.optimization.ConvergenceChecker;
|
||||
import org.apache.commons.math.optimization.RealPointValuePair;
|
||||
|
@ -35,7 +35,7 @@ import org.apache.commons.math.optimization.direct.BaseAbstractMultivariateOptim
|
|||
*/
|
||||
public abstract class AbstractScalarDifferentiableOptimizer
|
||||
extends BaseAbstractMultivariateOptimizer<DifferentiableMultivariateFunction>
|
||||
implements DifferentiableMultivariateRealOptimizer {
|
||||
implements DifferentiableMultivariateOptimizer {
|
||||
/**
|
||||
* Objective function gradient.
|
||||
*/
|
||||
|
|
|
@ -35,11 +35,11 @@
|
|||
* <li>{@link org.apache.commons.math.optimization.univariate.UnivariateRealOptimizer
|
||||
* UnivariateRealOptimizer} for {@link org.apache.commons.math.analysis.UnivariateFunction
|
||||
* univariate real functions}</li>
|
||||
* <li>{@link org.apache.commons.math.optimization.MultivariateRealOptimizer
|
||||
* MultivariateRealOptimizer} for {@link org.apache.commons.math.analysis.MultivariateFunction
|
||||
* <li>{@link org.apache.commons.math.optimization.MultivariateOptimizer
|
||||
* MultivariateOptimizer} for {@link org.apache.commons.math.analysis.MultivariateFunction
|
||||
* multivariate real functions}</li>
|
||||
* <li>{@link org.apache.commons.math.optimization.DifferentiableMultivariateRealOptimizer
|
||||
* DifferentiableMultivariateRealOptimizer} for {@link
|
||||
* <li>{@link org.apache.commons.math.optimization.DifferentiableMultivariateOptimizer
|
||||
* DifferentiableMultivariateOptimizer} for {@link
|
||||
* org.apache.commons.math.analysis.DifferentiableMultivariateFunction
|
||||
* differentiable multivariate real functions}</li>
|
||||
* <li>{@link org.apache.commons.math.optimization.DifferentiableMultivariateVectorOptimizer
|
||||
|
@ -57,7 +57,7 @@
|
|||
* real function} thanks to the {@link
|
||||
* org.apache.commons.math.optimization.LeastSquaresConverter LeastSquaresConverter} helper class.
|
||||
* The transformed function can be optimized using any implementation of the {@link
|
||||
* org.apache.commons.math.optimization.MultivariateRealOptimizer MultivariateRealOptimizer} interface.
|
||||
* org.apache.commons.math.optimization.MultivariateOptimizer MultivariateOptimizer} interface.
|
||||
* </p>
|
||||
*
|
||||
* <p>
|
||||
|
|
|
@ -792,7 +792,7 @@ public class BatteryNISTTest {
|
|||
}
|
||||
|
||||
/* generic test runner */
|
||||
private double[] run(MultivariateRealOptimizer optim, DifferentiableMultivariateFunction func, double[] start) {
|
||||
private double[] run(MultivariateOptimizer optim, DifferentiableMultivariateFunction func, double[] start) {
|
||||
return (optim.optimize(1000000, func, GoalType.MINIMIZE, start).getPointRef());
|
||||
}
|
||||
/* generic test runner for AbstractScalarDifferentiableOptimizer */
|
||||
|
|
|
@ -253,7 +253,7 @@ public class BOBYQAOptimizerTest {
|
|||
System.out.println(func.getClass().getName() + " BEGIN"); // XXX
|
||||
|
||||
int dim = startPoint.length;
|
||||
// MultivariateRealOptimizer optim =
|
||||
// MultivariateOptimizer optim =
|
||||
// new PowellOptimizer(1e-13, Math.ulp(1d));
|
||||
// RealPointValuePair result = optim.optimize(100000, func, goal, startPoint);
|
||||
final double[] lB = boundaries == null ? null : boundaries[0];
|
||||
|
|
|
@ -27,7 +27,7 @@ import org.apache.commons.math.exception.NoDataException;
|
|||
import org.apache.commons.math.exception.NotPositiveException;
|
||||
import org.apache.commons.math.exception.OutOfRangeException;
|
||||
import org.apache.commons.math.optimization.GoalType;
|
||||
import org.apache.commons.math.optimization.MultivariateRealOptimizer;
|
||||
import org.apache.commons.math.optimization.MultivariateOptimizer;
|
||||
import org.apache.commons.math.optimization.RealPointValuePair;
|
||||
import org.apache.commons.math.random.MersenneTwister;
|
||||
import org.junit.Assert;
|
||||
|
@ -375,7 +375,7 @@ public class CMAESOptimizerTest {
|
|||
RealPointValuePair expected) {
|
||||
int dim = startPoint.length;
|
||||
// test diagonalOnly = 0 - slow but normally fewer feval#
|
||||
MultivariateRealOptimizer optim =
|
||||
MultivariateOptimizer optim =
|
||||
new CMAESOptimizer(
|
||||
lambda, inSigma, boundaries, 30000,
|
||||
stopValue, isActive, diagonalOnly, 0, new MersenneTwister(),false);
|
||||
|
|
|
@ -19,7 +19,7 @@ package org.apache.commons.math.optimization.direct;
|
|||
import org.apache.commons.math.analysis.MultivariateFunction;
|
||||
import org.apache.commons.math.analysis.SumSincFunction;
|
||||
import org.apache.commons.math.optimization.GoalType;
|
||||
import org.apache.commons.math.optimization.MultivariateRealOptimizer;
|
||||
import org.apache.commons.math.optimization.MultivariateOptimizer;
|
||||
import org.apache.commons.math.optimization.RealPointValuePair;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
@ -131,7 +131,7 @@ public class PowellOptimizerTest {
|
|||
GoalType goal,
|
||||
double fTol,
|
||||
double pointTol) {
|
||||
final MultivariateRealOptimizer optim = new PowellOptimizer(fTol, Math.ulp(1d));
|
||||
final MultivariateOptimizer optim = new PowellOptimizer(fTol, Math.ulp(1d));
|
||||
|
||||
final RealPointValuePair result = optim.optimize(1000, func, goal, init);
|
||||
final double[] found = result.getPoint();
|
||||
|
|
Loading…
Reference in New Issue