|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.math3.optimization.direct.BaseAbstractMultivariateVectorOptimizer<FUNC>
FUNC
- the type of the objective function to be optimizedpublic abstract class BaseAbstractMultivariateVectorOptimizer<FUNC extends MultivariateVectorFunction>
Base class for implementing optimizers for multivariate scalar functions. This base class handles the boiler-plate methods associated to thresholds settings, iterations and evaluations counting.
Field Summary | |
---|---|
private ConvergenceChecker<PointVectorValuePair> |
checker
Convergence checker. |
protected Incrementor |
evaluations
Evaluations counter. |
private MultivariateVectorFunction |
function
Objective function. |
private double[] |
start
Initial guess. |
private double[] |
target
Target value for the objective functions at optimum. |
private double[] |
weight
Weight for the least squares cost computation. |
Constructor Summary | |
---|---|
protected |
BaseAbstractMultivariateVectorOptimizer()
Simple constructor with default settings. |
protected |
BaseAbstractMultivariateVectorOptimizer(ConvergenceChecker<PointVectorValuePair> checker)
|
Method Summary | |
---|---|
protected double[] |
computeObjectiveValue(double[] point)
Compute the objective function value. |
protected abstract PointVectorValuePair |
doOptimize()
Perform the bulk of the optimization algorithm. |
ConvergenceChecker<PointVectorValuePair> |
getConvergenceChecker()
Get the convergence checker. |
int |
getEvaluations()
Get the number of evaluations of the objective function. |
int |
getMaxEvaluations()
Get the maximal number of function evaluations. |
double[] |
getStartPoint()
|
protected double[] |
getTargetRef()
|
protected double[] |
getWeightRef()
|
PointVectorValuePair |
optimize(int maxEval,
FUNC f,
double[] t,
double[] w,
double[] startPoint)
Optimize an objective function. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final Incrementor evaluations
private ConvergenceChecker<PointVectorValuePair> checker
private double[] target
private double[] weight
private double[] start
private MultivariateVectorFunction function
Constructor Detail |
---|
protected BaseAbstractMultivariateVectorOptimizer()
SimpleVectorValueChecker
and
the allowed number of evaluations is set to Integer.MAX_VALUE
.
protected BaseAbstractMultivariateVectorOptimizer(ConvergenceChecker<PointVectorValuePair> checker)
checker
- Convergence checker.Method Detail |
---|
public int getMaxEvaluations()
getMaxEvaluations
in interface BaseOptimizer<PointVectorValuePair>
public int getEvaluations()
optimize
method. It is 0 if the method has not been
called yet.
getEvaluations
in interface BaseOptimizer<PointVectorValuePair>
public ConvergenceChecker<PointVectorValuePair> getConvergenceChecker()
getConvergenceChecker
in interface BaseOptimizer<PointVectorValuePair>
protected double[] computeObjectiveValue(double[] point)
point
- Point at which the objective function must be evaluated.
TooManyEvaluationsException
- if the maximal number of evaluations is
exceeded.public PointVectorValuePair optimize(int maxEval, FUNC f, double[] t, double[] w, double[] startPoint)
∑weighti(objectivei - targeti)2
optimize
in interface BaseMultivariateVectorOptimizer<FUNC extends MultivariateVectorFunction>
maxEval
- Maximum number of function evaluations.f
- Objective function.t
- Target value for the objective functions at optimum.w
- Weights for the least squares cost computation.startPoint
- Start point for optimization.
public double[] getStartPoint()
protected abstract PointVectorValuePair doOptimize()
protected double[] getTargetRef()
array
.protected double[] getWeightRef()
array
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |