|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsavi.alg.SimAnnealingSkeleton
public abstract class SimAnnealingSkeleton
Basic abstract class for solvers. Solver should be derived from this class if it will be used with other SAVi modules.
Field Summary | |
---|---|
protected double |
coolFactor
Cooling factor specified by parameter in constructor |
protected double |
finalTemp
Final temperature specified by parameter in constructor |
protected StateSkeleton |
state
Contain reference to current state. |
protected double |
temp
Current temperature |
Constructor Summary | |
---|---|
SimAnnealingSkeleton(StateSkeleton s,
double temp,
double finalTemp,
double coolFactor)
Creates a new instance of SimAnnealingSkeleton, initialize protected variables. |
Method Summary | |
---|---|
protected abstract void |
cool()
This must be implemented, call this function lowers current temperature. |
protected abstract void |
equilibrium()
It must be implemented. |
protected abstract boolean |
frozen()
It must be implemented. |
StateSkeleton |
getState()
Return current state of this algorithm. |
double |
getTemp()
Returns current temperature |
abstract StateSkeleton |
solve()
Must be implemented, it should solve problem. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected StateSkeleton state
protected double temp
protected double finalTemp
protected double coolFactor
Constructor Detail |
---|
public SimAnnealingSkeleton(StateSkeleton s, double temp, double finalTemp, double coolFactor)
s
- Initial statetemp
- Starting temperature valuefinalTemp
- Final temperature value.coolFactor
- Cooling factorMethod Detail |
---|
public StateSkeleton getState()
public double getTemp()
protected abstract void cool()
protected abstract void equilibrium()
protected abstract boolean frozen()
public abstract StateSkeleton solve()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |