|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--org.omegahat.Numerics.Optimizers.LineSearchBasic
the basic line search algorithm structure, without any particular algorithm.
This class defines some fields, such as the minimum and maximum step length, plus a few utility methods.
| Field Summary | |
protected boolean |
debug
|
protected NumericArray |
direction
|
protected int |
evaluations
the number of evaluations in this line search. |
protected int |
maxEvaluations
|
protected LineStep |
origin
|
protected int |
state
the state represented by this step. |
protected double |
stepMax
steps must never be greater than this (large) number, default 1.e20. |
protected double |
stepMin
steps must never be less than this (small) number, default 1e-20. |
| Fields inherited from interface org.omegahat.Numerics.Optimizers.LineSearch |
CONTINUE, EXCEPTION, SUCCESSFUL, TOO_LARGE, TOO_MANY, TOO_NARROW, TOO_SMALL |
| Constructor Summary | |
LineSearchBasic()
|
|
| Method Summary | |
boolean |
continueIteration(LineStep step)
Tests whether the search should continue. |
boolean |
getDebug()
Accessor for debug field |
NumericArray |
getDirection()
Accessor for direction field |
int |
getEvaluations()
Accessor for evaluations field |
int |
getMaxEvaluations()
Accessor for maxEvaluations field |
LineStep |
getOrigin()
Accessor for origin field |
int |
getState()
Accessor for state field |
double |
getStepMax()
Accessor for stepMax field |
double |
getStepMin()
Accessor for stepMin field |
int |
incrementCount()
Increment the count of evaluations; this does not test against the maxEvaluations field, but the
continueIteration method should. |
LineStep |
initialize(ModelPointNumericInt origin,
NumericArray p,
double step)
Initialize the original step using the given model point, direction and step size. |
boolean |
setDebug(boolean value)
Accessor for setting debug field |
NumericArray |
setDirection(NumericArray value)
Accessor for setting direction field |
int |
setEvaluations(int value)
Accessor for setting evaluations field |
int |
setMaxEvaluations(int value)
Accessor for setting maxEvaluations field |
LineStep |
setOrigin(LineStep value)
Accessor for setting origin field |
int |
setState(int value)
Accessor for setting state field |
double |
setStepMax(double value)
Accessor for setting stepMax field |
double |
setStepMin(double value)
Accessor for setting stepMin field |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.omegahat.Numerics.Optimizers.LineSearch |
refineStep |
| Field Detail |
protected int evaluations
protected int maxEvaluations
protected int state
It should be one of the pre-defined states in the LineSearch interface.
protected double stepMax
protected double stepMin
protected LineStep origin
protected NumericArray direction
protected boolean debug
| Constructor Detail |
public LineSearchBasic()
| Method Detail |
public int getEvaluations()
evaluations fieldpublic int setEvaluations(int value)
evaluations fieldpublic int getMaxEvaluations()
maxEvaluations fieldpublic int setMaxEvaluations(int value)
maxEvaluations fieldpublic int getState()
state fieldgetState in interface LineSearchpublic int setState(int value)
state fieldsetState in interface LineSearchpublic double getStepMax()
stepMax fieldpublic double setStepMax(double value)
stepMax fieldpublic double getStepMin()
stepMin fieldpublic double setStepMin(double value)
stepMin fieldpublic LineStep getOrigin()
origin fieldpublic LineStep setOrigin(LineStep value)
origin fieldpublic NumericArray getDirection()
direction fieldpublic NumericArray setDirection(NumericArray value)
direction fieldpublic boolean getDebug()
debug fieldpublic boolean setDebug(boolean value)
debug fieldpublic int incrementCount()
maxEvaluations field, but the
continueIteration method should.
public LineStep initialize(ModelPointNumericInt origin,
NumericArray p,
double step)
The returned object has an (unevaluated) model point shifted by the specified step along the specified direction from the origin.
initialize in interface LineSearchpublic boolean continueIteration(LineStep step)
SUCCESSFUL in case of numeric convergence by the
criterion of the search, or any of a number of states indicating failure.The method in this class only checks for failures: too small or large a step, or too many evaluations.
continueIteration in interface LineSearch
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||