SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.optimization.unconstrained.steepestdescent
Class SteepestDescent.LineSearch

java.lang.Object
  extended by com.numericalmethod.suanshu.optimization.unconstrained.steepestdescent.SteepestDescent.LineSearch
Direct Known Subclasses:
QuasiNewton.QuasiNewtonImpl
Enclosing class:
SteepestDescent

public abstract class SteepestDescent.LineSearch
extends java.lang.Object

A steepest-descent method, in each iteration, searches along a direction to find the next best minimizer along a direction. We want to find out how much the minimizer moves in this direction.

By making LineSearch an inner class, its methods will have access to the members in SteepestDescent, e.g., f. This is to avoid storing the same datum in multiple places, hence no inconsistency problem. For the very same reason, this class cannot be made static in order to access the non-static members in SteepestDescent, e.g., f. TODO: Consequently, (a problem?) the member storing an instance of LineSearch, e.g., lsearch, cannot be passed in the constructors. A non-static inner class cannot be created before the enclosing class is created.


Field Summary
protected  Vector dk
          the line search direction at the k-th iteration
protected  Vector gk
          the gradient evaluated at xk
 RntoMatrix H
          the Hessian function, H(x)
protected  Matrix Hk
          the Hessian evaluated at xk
 
Constructor Summary
protected SteepestDescent.LineSearch(RntoMatrix H)
          Construct a line search instance.
 
Method Summary
protected abstract  double minimize(Vector xk)
          Perform a line search to minimize a function, starting from xk.
protected  void reset()
          Reset the transient states of the instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

H

public final RntoMatrix H
the Hessian function, H(x)


gk

protected Vector gk
the gradient evaluated at xk


Hk

protected Matrix Hk
the Hessian evaluated at xk


dk

protected Vector dk
the line search direction at the k-th iteration

Constructor Detail

SteepestDescent.LineSearch

protected SteepestDescent.LineSearch(RntoMatrix H)
Construct a line search instance.

Parameters:
H - the function to compute the Hessian at x
Method Detail

reset

protected void reset()
Reset the transient states of the instance.


minimize

protected abstract double minimize(Vector xk)
Perform a line search to minimize a function, starting from xk.

Parameters:
xk - the current minimizer
Returns:
ak+1

SuanShu, a Java numerical and statistical library

Copyright © 2011 Numerical Method Inc. Ltd. All Rights Reserved.