gov.sandia.cognition.learning.algorithm.minimization.line
Class WolfeConditions

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.learning.algorithm.minimization.line.WolfeConditions
All Implemented Interfaces:
CloneableSerializable, Serializable, Cloneable

@PublicationReferences(references={@PublicationReference(author="R. Fletcher",title="Practical Methods of Optimization, Second Edition",type=Book,year=1987,pages={26,30},notes={"Equation 2.5.1 and Equation 2.5.6","Fletcher assumes the initial point has negative slope."}),@PublicationReference(author="Wikipedia",title="Wolfe conditions",url="http://en.wikipedia.org/wiki/Wolfe_conditions",type=WebPage,year=2008)})
public class WolfeConditions
extends AbstractCloneableSerializable

The Wolfe conditions define a set of sufficient conditions for "sufficient decrease" in inexact line search. These consist of two "anded" conditions: The Goldstein condition specifying sufficient decrease, sometimes called the "Armijo condition", and the curvature condition ensuring that a trial point is sufficiently steep. The Wolfe conditions are sometimes called the "Wolfe-Powell conditions".

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

Constructor Summary
WolfeConditions(InputOutputSlopeTriplet originalPoint, double slopeCondition, double curvatureCondition)
          Creates a new instance of WolfeConditions
WolfeConditions(WolfeConditions other)
          Copy Constructor
 
Method Summary
 WolfeConditions clone()
          This makes public the clone method on the Object class and removes the exception that it throws.
 boolean evaluate(InputOutputSlopeTriplet trialPoint)
          Evaluates if the trial point meets the Wolfe conditions
 boolean evaluateGoldsteinCondition(InputOutputPair<Double,Double> trialPoint)
          Evaluates the Goldstein (Armijo) conditions, which is purely a sufficient decrease condition.
static boolean evaluateGoldsteinCondition(InputOutputSlopeTriplet originalPoint, InputOutputPair<Double,Double> trialPoint, double slopeCondition)
          Evaluates the Goldstein (Armijo) conditions, which is purely a sufficient decrease condition.
 boolean evaluateStrictCurvatureCondition(double trialSlope)
          Evaluates the strict curvature condition.
static boolean evaluateStrictCurvatureCondition(double originalSlope, double trialSlope, double curvatureCondition)
          Evaluates the strict curvature condition.
 double getCurvatureCondition()
          Getter for curvatureCondition
 InputOutputSlopeTriplet getOriginalPoint()
          Getter for originalPoint
 double getSlopeCondition()
          Getter for slopeCondition
 void setCurvatureCondition(double curvatureCondition)
          Setter for curvatureCondition
 void setOriginalPoint(InputOutputSlopeTriplet originalPoint)
          Setter for originalPoint
 void setSlopeCondition(double slopeCondition)
          Setter for slopeCondition
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WolfeConditions

public WolfeConditions(InputOutputSlopeTriplet originalPoint,
                       double slopeCondition,
                       double curvatureCondition)
Creates a new instance of WolfeConditions

Parameters:
originalPoint - Original point to store, slope must be less than 0.0.
slopeCondition - Slope condition parameter for the Goldstein condition, must be less than curvatureCondition and on the interval (0,1).
curvatureCondition - Curvature condition for the curvature condition, must be greater than slopeCondition and on the interval (0,1).

WolfeConditions

public WolfeConditions(WolfeConditions other)
Copy Constructor

Parameters:
other - WolfeConditions to copy
Method Detail

clone

public WolfeConditions clone()
Description copied from class: AbstractCloneableSerializable
This makes public the clone method on the Object class and removes the exception that it throws. Its default behavior is to automatically create a clone of the exact type of object that the clone is called on and to copy all primitives but to keep all references, which means it is a shallow copy. Extensions of this class may want to override this method (but call super.clone() to implement a "smart copy". That is, to target the most common use case for creating a copy of the object. Because of the default behavior being a shallow copy, extending classes only need to handle fields that need to have a deeper copy (or those that need to be reset). Some of the methods in ObjectUtil may be helpful in implementing a custom clone method. Note: The contract of this method is that you must use super.clone() as the basis for your implementation.

Specified by:
clone in interface CloneableSerializable
Overrides:
clone in class AbstractCloneableSerializable
Returns:
A clone of this object.

evaluate

public boolean evaluate(InputOutputSlopeTriplet trialPoint)
Evaluates if the trial point meets the Wolfe conditions

Parameters:
trialPoint - Trial point to consider
Returns:
True if Wolfe conditions for sufficient decrease are satisfied, false if either the Goldstein or strict curvature conditions are not satisfied.

evaluateGoldsteinCondition

public boolean evaluateGoldsteinCondition(InputOutputPair<Double,Double> trialPoint)
Evaluates the Goldstein (Armijo) conditions, which is purely a sufficient decrease condition.

Parameters:
trialPoint - Trial point to consider.
Returns:
True if the Goldstein condition is satisfied, false otherwise.

evaluateGoldsteinCondition

@PublicationReference(author="R. Fletcher",
                      title="Practical Methods of Optimization, Second Edition",
                      type=Book,
                      year=1987,
                      pages=27,
                      notes="Equation 2.5.1")
public static boolean evaluateGoldsteinCondition(InputOutputSlopeTriplet originalPoint,
                                                                                                       InputOutputPair<Double,Double> trialPoint,
                                                                                                       double slopeCondition)
Evaluates the Goldstein (Armijo) conditions, which is purely a sufficient decrease condition.

Parameters:
originalPoint - Original point to store, slope must be less than 0.0.
trialPoint - Trial point to consider.
slopeCondition - Slope condition parameter for the Goldstein condition, must be less than curvatureCondition and on the interval (0,1).
Returns:
True if the Goldstein condition is satisfied, false otherwise.

evaluateStrictCurvatureCondition

public boolean evaluateStrictCurvatureCondition(double trialSlope)
Evaluates the strict curvature condition.

Parameters:
trialSlope - Trial slope to consider.
Returns:
True if the strict curvature condition is satisfied, false otherwise.

evaluateStrictCurvatureCondition

@PublicationReference(author="R. Fletcher",
                      title="Practical Methods of Optimization, Second Edition",
                      type=Book,
                      year=1987,
                      pages=29,
                      notes="Equation 2.5.6")
public static boolean evaluateStrictCurvatureCondition(double originalSlope,
                                                                                                             double trialSlope,
                                                                                                             double curvatureCondition)
Evaluates the strict curvature condition.

Parameters:
originalSlope - Slope at the original point.
trialSlope - Trial slope to consider.
curvatureCondition - Curvature condition for the curvature condition, must be greater than slopeCondition and on the interval (0,1).
Returns:
True if the strict curvature condition is satisfied, false otherwise.

getOriginalPoint

public InputOutputSlopeTriplet getOriginalPoint()
Getter for originalPoint

Returns:
Original point to store, slope must be less than 0.0.

setOriginalPoint

public void setOriginalPoint(InputOutputSlopeTriplet originalPoint)
Setter for originalPoint

Parameters:
originalPoint - Original point to store, slope must be less than 0.0.

getSlopeCondition

public double getSlopeCondition()
Getter for slopeCondition

Returns:
Slope condition parameter for the Goldstein condition, must be less than curvatureCondition and on the interval (0,1).

setSlopeCondition

public void setSlopeCondition(double slopeCondition)
Setter for slopeCondition

Parameters:
slopeCondition - Slope condition parameter for the Goldstein condition, must be less than curvatureCondition and on the interval (0,1).

getCurvatureCondition

public double getCurvatureCondition()
Getter for curvatureCondition

Returns:
Curvature condition for the curvature condition, must be greater than slopeCondition and on the interval (0,1).

setCurvatureCondition

public void setCurvatureCondition(double curvatureCondition)
Setter for curvatureCondition

Parameters:
curvatureCondition - Curvature condition for the curvature condition, must be greater than slopeCondition and on the interval (0,1).