WebCab Optimization
v2.6
(J2EE Edition)

com.webcab.ejb.math.optimization.unidimensional
Interface LocateAlgorithm

All Superinterfaces:
Serializable
All Known Implementing Classes:
BrentDerivLocate, BrentLocate, CubicDerivLocate, LinearLocate, ParabolicIterativeLocate, ParabolicLocate

public interface LocateAlgorithm
extends Serializable

This interface must be implemented by all classes providing locate algorithms.

A locate algorithm finds an extremum given a bracket that contains it.

See Also:
LinearLocate, BrentLocate, BrentDerivLocate, ParabolicIterativeLocate, CubicDerivLocate, ParabolicLocate

Method Summary
 double locate(Bracket br, UniDimensionalFunction f, double tol, int maxiter)
          Shrinks the bracketing interval until a satisfactory approximation for the extremum it contains can be found.
 

Method Detail

locate

public double locate(Bracket br,
                     UniDimensionalFunction f,
                     double tol,
                     int maxiter)
              throws TooManyUniDimensionalIterationsException,
                     InvalidUniDimensionalFunctionException
Shrinks the bracketing interval until a satisfactory approximation for the extremum it contains can be found.

Parameters:
br - The bracket with all three points initialized.
f - The function. Some algorithms may require for the function to implement Derivative.
tol - algorithm dependent
maxiter - used only in the iterative locate algorithms. If the number of iterations exceeds this number TooManyIterationsException will be thrown.
Returns:
The approximation for the point where the function has an extremum.
Throws:
TooManyIterationsException - thrown if the number of iterations in locate algorithms is greater than maxiter.
InvalidFunctionException - thrown if the user function returns invalid values like infinity or NaN.
TooManyUniDimensionalIterationsException
InvalidUniDimensionalFunctionException

WebCab Optimization
v2.6
(J2EE Edition)