org.omegahat.Numerics.Optimizers
Interface OptimizerAlgorithm

All Known Subinterfaces:
EnumerableOptimizerAlgorithm
All Known Implementing Classes:
OptimizerAlgorithmBasic

public interface OptimizerAlgorithm

An interface for the algorithms that carry out optimization.

The essence of an optimizing algorithm is its ability to refine the current model through some numerical (or, more generally, computational) procedure. An implementing class will provide some particular code for this by its implementation of the refine method.

The other methods in this inteface provide for initializing and wrapping up the computations.

All the methods take an OptimizerIterator object as an argument. When the methods are called, this argument gives a reference to the optimizer ``controlling'' the algorithm. It is the optimizer, not the algorithm, that keeps track of the iteration, usually through iteration listeners. By getting this object as an argument, the algorithm can use information about the surrounding iteration, though as a design issue it should usually not alter the structure of the controlling optimizer during a refine step.

The dual layer of optimizer and optimizer algorithm along with the specific object referring to them allow a variety of optimization architectures, such as hybrid algorithms and recursive sub-optimizations.


Method Summary
 ModelPoint initialize(ModelPoint theta, OptimizerIterator opt)
          Initialize any algorithm-specific data.
 ModelPoint newModelPoint()
          A specific algorithm will choose a specific representation for model points; this method returns a new instance of the chosen class.
 ModelPoint refine(ModelPoint theta, OptimizerIterator opt)
          Refine the current model point.
 ModelPoint wrapup(ModelPoint theta, OptimizerIterator opt)
          Wrap up when the optimization is complete.
 

Method Detail

refine

public ModelPoint refine(ModelPoint theta,
                         OptimizerIterator opt)
Refine the current model point.

initialize

public ModelPoint initialize(ModelPoint theta,
                             OptimizerIterator opt)
Initialize any algorithm-specific data.

wrapup

public ModelPoint wrapup(ModelPoint theta,
                         OptimizerIterator opt)
Wrap up when the optimization is complete.

newModelPoint

public ModelPoint newModelPoint()
A specific algorithm will choose a specific representation for model points; this method returns a new instance of the chosen class.

The use of the matrix package mechanism allows the algorithm code itself to be independent of the actual class chosen. See OptimizerAlgorithmBasic for an example.