gov.sandia.cognition.learning.algorithm.minimization.line.interpolator
Class LineBracketInterpolatorBrent

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.learning.algorithm.minimization.line.interpolator.AbstractLineBracketInterpolator<Evaluator<Double,Double>>
          extended by gov.sandia.cognition.learning.algorithm.minimization.line.interpolator.LineBracketInterpolatorBrent
All Implemented Interfaces:
LineBracketInterpolator<Evaluator<Double,Double>>, CloneableSerializable, Serializable, Cloneable

public class LineBracketInterpolatorBrent
extends AbstractLineBracketInterpolator<Evaluator<Double,Double>>

Implements Brent's method of function interpolation to find a minimum. If the function is well behaved, then Brent uses non-slope-based parabolic interpolation. Otherwise, Brent uses Golden-section and secant interpolation.

Since:
2.1
Author:
Kevin R. Dixon
See Also:
Serialized Form

Field Summary
 
Fields inherited from class gov.sandia.cognition.learning.algorithm.minimization.line.interpolator.AbstractLineBracketInterpolator
DEFAULT_TOLERANCE
 
Constructor Summary
LineBracketInterpolatorBrent()
          Creates a new instance of LineBracketInterpolatorBrent
 
Method Summary
 double findMinimum(LineBracket bracket, double minx, double maxx, Evaluator<Double,Double> function)
          Finds the minimum of the bracket using the interpolation/extrapolation routine, where the minimum must lie between the minx and maxx values on the x-axis.
 LineBracketInterpolatorGoldenSection getGoldenInterpolator()
          Getter for goldenInterpolator
 LineBracketInterpolatorParabola getParabolicInterpolator()
          Getter for parabolicInterpolator
 boolean hasSufficientPoints(LineBracket bracket)
          Determines if the LineBracket contains a sufficient number/quality of points to conduct the interpolation.
 void setGoldenInterpolator(LineBracketInterpolatorGoldenSection goldenInterpolator)
          Setter for goldenInterpolator
 void setParabolicInterpolator(LineBracketInterpolatorParabola parabolicInterpolator)
          Setter for parabolicInterpolator
 
Methods inherited from class gov.sandia.cognition.learning.algorithm.minimization.line.interpolator.AbstractLineBracketInterpolator
getTolerance, setTolerance
 
Methods inherited from class gov.sandia.cognition.util.AbstractCloneableSerializable
clone
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface gov.sandia.cognition.util.CloneableSerializable
clone
 

Constructor Detail

LineBracketInterpolatorBrent

public LineBracketInterpolatorBrent()
Creates a new instance of LineBracketInterpolatorBrent

Method Detail

findMinimum

public double findMinimum(LineBracket bracket,
                          double minx,
                          double maxx,
                          Evaluator<Double,Double> function)
Description copied from interface: LineBracketInterpolator
Finds the minimum of the bracket using the interpolation/extrapolation routine, where the minimum must lie between the minx and maxx values on the x-axis.

Parameters:
bracket - Bracket of points
minx - Minimum x-axis value to search for the minimum
maxx - Maximum x-axis value to search for the minimum
function - Function to consider. The function, or gradient, may be evaluated to generate enough output/slope samples to interpolate.
Returns:
Minimum value of the function between minx and maxx.

hasSufficientPoints

public boolean hasSufficientPoints(LineBracket bracket)
Description copied from interface: LineBracketInterpolator
Determines if the LineBracket contains a sufficient number/quality of points to conduct the interpolation.

Parameters:
bracket - LineBracket to consider
Returns:
true if the LineBracket has a sufficient number of points, false if the LineBracket doesn't have enough.

getParabolicInterpolator

public LineBracketInterpolatorParabola getParabolicInterpolator()
Getter for parabolicInterpolator

Returns:
Non-slope based parabolic interpolator.

setParabolicInterpolator

public void setParabolicInterpolator(LineBracketInterpolatorParabola parabolicInterpolator)
Setter for parabolicInterpolator

Parameters:
parabolicInterpolator - Non-slope based parabolic interpolator.

getGoldenInterpolator

public LineBracketInterpolatorGoldenSection getGoldenInterpolator()
Getter for goldenInterpolator

Returns:
Golden-section step interpolator.

setGoldenInterpolator

public void setGoldenInterpolator(LineBracketInterpolatorGoldenSection goldenInterpolator)
Setter for goldenInterpolator

Parameters:
goldenInterpolator - Golden-section step interpolator.