Top Description Fields Constructors Methods
org.apache.commons.math3.optim.nonlinear.vector

public Class MultiStartMultivariateVectorOptimizer

extends BaseMultiStartMultivariateOptimizer<PointVectorValuePair>
Class Inheritance
Annotations
@Deprecated
Imports
java.util.Collections, .List, .ArrayList, .Comparator, org.apache.commons.math3.exception.NotStrictlyPositiveException, .NullArgumentException, org.apache.commons.math3.linear.RealMatrix, .RealVector, .ArrayRealVector, org.apache.commons.math3.random.RandomVectorGenerator, org.apache.commons.math3.optim.BaseMultiStartMultivariateOptimizer, .PointVectorValuePair

Deprecated

Multi-start optimizer for a (vector) model function. This class wraps an optimizer in order to use it several times in turn with different starting points (trying to avoid being trapped in a local extremum when looking for a global one).
Since
3.0

Field Summary

Modifier and TypeField and Description
private final List<PointVectorValuePair>
optima

Found optima.

private final MultivariateVectorOptimizer
optimizer

Hides org.apache.commons.math3.optim.BaseMultiStartMultivariateOptimizer.optimizer.

Deprecated as a consequence of MultivariateVectorOptimizer being deprecated.
Underlying optimizer.

Constructor Summary

AccessConstructor and Description
public
MultiStartMultivariateVectorOptimizer(final MultivariateVectorOptimizer
Single-start optimizer to wrap.
optimizer
,
final int
Number of starts to perform. If starts == 1, the result will be same as if optimizer is called directly.
starts
,
final RandomVectorGenerator
Random vector generator to use for restarts.
generator
)
Deprecated as a consequence of MultivariateVectorOptimizer being deprecated.

Create a multi-start optimizer from a single-start optimizer.

Method Summary

Modifier and TypeMethod and Description
protected void
clear()

Implements abstract org.apache.commons.math3.optim.BaseMultiStartMultivariateOptimizer.clear.

Method that will called in order to clear all stored optima.

public PointVectorValuePair[]
getOptima()

Implements abstract org.apache.commons.math3.optim.BaseMultiStartMultivariateOptimizer.getOptima.

Gets all the optima found during the last call to optimize.

private Comparator<PointVectorValuePair>

Returns:

a comparator for sorting the optima.
getPairComparator
()

protected void
store(PointVectorValuePair
Result of an optimization run.
optimum
)

Implements abstract org.apache.commons.math3.optim.BaseMultiStartMultivariateOptimizer.store.

Method that will be called in order to store each found optimum.

Inherited from org.apache.commons.math3.optim.BaseMultiStartMultivariateOptimizer:
doOptimizegetEvaluationsoptimize

Field Detail

optimaback to summary
private final List<PointVectorValuePair> optima

Found optima.

optimizerback to summary
private final MultivariateVectorOptimizer optimizer

Hides org.apache.commons.math3.optim.BaseMultiStartMultivariateOptimizer.optimizer.

Deprecated

as a consequence of MultivariateVectorOptimizer being deprecated. See corresponding docs for further information.

Underlying optimizer.

Constructor Detail

MultiStartMultivariateVectorOptimizerback to summary
public MultiStartMultivariateVectorOptimizer(final MultivariateVectorOptimizer optimizer, final int starts, final RandomVectorGenerator generator) throws NullArgumentException, NotStrictlyPositiveException

Deprecated

as a consequence of MultivariateVectorOptimizer being deprecated. See corresponding docs for further information.

Create a multi-start optimizer from a single-start optimizer.

Parameters
optimizer:MultivariateVectorOptimizer

Single-start optimizer to wrap.

starts:int

Number of starts to perform. If starts == 1, the result will be same as if optimizer is called directly.

generator:RandomVectorGenerator

Random vector generator to use for restarts.

Exceptions
NullArgumentException:
if optimizer or generator is null.
NotStrictlyPositiveException:
if starts < 1.

Method Detail

clearback to summary
protected void clear()

Implements abstract org.apache.commons.math3.optim.BaseMultiStartMultivariateOptimizer.clear.

Doc from org.apache.commons.math3.optim.BaseMultiStartMultivariateOptimizer.clear.

Method that will called in order to clear all stored optima.

Annotations
@Override
getOptimaback to summary
public PointVectorValuePair[] getOptima()

Implements abstract org.apache.commons.math3.optim.BaseMultiStartMultivariateOptimizer.getOptima.

Doc from org.apache.commons.math3.optim.BaseMultiStartMultivariateOptimizer.getOptima.

Gets all the optima found during the last call to optimize. The optimizer stores all the optima found during a set of restarts. The optimize method returns the best point only. This method returns all the points found at the end of each starts, including the best one already returned by the optimize method.
The returned array as one element for each start as specified in the constructor. It is ordered with the results from the runs that did converge first, sorted from best to worst objective value (i.e in ascending order if minimizing and in descending order if maximizing), followed by null elements corresponding to the runs that did not converge. This means all elements will be null if the optimize method did throw an exception. This also means that if the first element is not null, it is the best point found across all starts.
The behaviour is undefined if this method is called before optimize; it will likely throw NullPointerException.

Returns:PointVectorValuePair[]

an array containing the optima sorted from best to worst.

Annotations
@Override
getPairComparatorback to summary
private Comparator<PointVectorValuePair> getPairComparator()
Returns:Comparator<PointVectorValuePair>

a comparator for sorting the optima.

storeback to summary
protected void store(PointVectorValuePair optimum)

Implements abstract org.apache.commons.math3.optim.BaseMultiStartMultivariateOptimizer.store.

Doc from org.apache.commons.math3.optim.BaseMultiStartMultivariateOptimizer.store.

Method that will be called in order to store each found optimum.

Parameters
optimum:PointVectorValuePair

Result of an optimization run.

Annotations
@Override