com.webcab.ejb.math.optimization.unidimensional
Class ParabolicLocate
java.lang.Object
|
+--com.webcab.ejb.math.optimization.unidimensional.ParabolicLocate
- All Implemented Interfaces:
- LocateAlgorithm, Serializable
- public class ParabolicLocate
- extends Object
- implements LocateAlgorithm
Non-iterative parabolic interpolation algorithm.
This is a very simple and fast general non-iterative locate algorithm. Given a set
of three points a, b, and c that bracket an extreme, the algorithm finds an approximation
of that extreme in one step, using parabolic interpolation.
- See Also:
- Serialized Form
|
Method Summary |
double |
locate(Bracket br,
UniDimensionalFunction f,
double tol,
int maxiter)
Takes a guess for the point where the function takes on an extremum, by using parabolic
interpolation. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ParabolicLocate
public ParabolicLocate()
locate
public double locate(Bracket br,
UniDimensionalFunction f,
double tol,
int maxiter)
throws TooManyUniDimensionalIterationsException,
InvalidUniDimensionalFunctionException
- Takes a guess for the point where the function takes on an extremum, by using parabolic
interpolation.
- Specified by:
locate in interface LocateAlgorithm
- Parameters:
br - The bracket with all three points initialized.f - The function. Some algorithms may require for the function to be derivable.tol - not usedmaxiter - not used
- Returns:
- The approximation for the point where the function has an extremum.
- Throws:
InvalidUniDimensionalFunctionException - thrown if the user function returns invalid
values like infinity or NaN.
TooManyUniDimensionalIterationsException- See Also:
LocateAlgorithm,
LinearLocate,
BrentLocate,
BrentDerivLocate,
CubicDerivLocate,
ParabolicLocate