|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object databionics.esom.cooling.Cooling
public abstract class Cooling
Abstract base class for cooling of a parameter. Subclasses need to override the calculate(int step) method.
Field Summary | |
---|---|
protected double |
end
final value of the parameter |
protected static org.apache.log4j.Logger |
log
interface to log4j system |
protected double |
start
initial value of the parameter |
protected int |
steps
number of steps toward the final value of the parameter |
Constructor Summary | |
---|---|
Cooling()
Create a new cooling object with default parameters start = 1.0,steps = 100,end = 0.0 |
|
Cooling(double start,
int steps,
double end)
Create a new cooling object |
Method Summary | |
---|---|
protected abstract double |
calculate(int step)
Calculate the parameter value for this step. |
double |
get(int step)
Get value of parameter by the step number. |
int |
getAsInt(int step)
Get value of parameter rounded to the nearest int |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final org.apache.log4j.Logger log
protected double start
protected int steps
protected double end
Constructor Detail |
---|
public Cooling()
public Cooling(double start, int steps, double end)
start
- Initial value of the parametersteps
- Steps towards the final value of the parameterend
- Final value of the parameterMethod Detail |
---|
protected abstract double calculate(int step)
step
- current step ([0..steps-1])public double get(int step)
step
- current step ([0..steps-1])
public int getAsInt(int step)
step
- current step ([0..steps-1])
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |