|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.jstacs.algorithms.optimization.LimitedMedianStartDistance
public class LimitedMedianStartDistance
This class implements a StartDistanceForecaster
that uses the
median of a limited memory over the last values. The method
getNewStartDistance()
returns
0.667*median
.
Constructor Summary | |
---|---|
LimitedMedianStartDistance(int slots,
double value)
This constructor creates an instance with slots memory slots
that will initially be filled with value . |
Method Summary | |
---|---|
double |
getNewStartDistance()
This method returns the new positive start distance. |
void |
reset()
Resets the object to the initial state. |
void |
setLastDistance(double last)
Sets the last used distance. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LimitedMedianStartDistance(int slots, double value)
slots
memory slots
that will initially be filled with value
.
slots
- the number of slots in the memoryvalue
- the initial value for the slotsMethod Detail |
---|
public double getNewStartDistance()
StartDistanceForecaster
getNewStartDistance
in interface StartDistanceForecaster
StartDistanceForecaster.setLastDistance(double)
public void setLastDistance(double last)
StartDistanceForecaster
setLastDistance
in interface StartDistanceForecaster
last
- the last used distancepublic void reset()
StartDistanceForecaster
reset
in interface StartDistanceForecaster
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |