databionics.esom.cooling
Class LinearCooling

java.lang.Object
  extended by databionics.esom.cooling.Cooling
      extended by databionics.esom.cooling.CachedCooling
          extended by databionics.esom.cooling.LinearCooling

public class LinearCooling
extends CachedCooling

Linear cooling of a parameter.


Field Summary
protected  double diff
          difference between succesive y values
protected static org.apache.log4j.Logger log
          interface to log4j system
 
Fields inherited from class databionics.esom.cooling.CachedCooling
cache, offset
 
Fields inherited from class databionics.esom.cooling.Cooling
end, start, steps
 
Constructor Summary
LinearCooling(double start, int steps, double end)
          Create a new linear cooling object
 
Method Summary
protected  double calculate(int step)
          Calculate the parameter value for this step.
protected  void init()
          Initialize constants and the cache.
 
Methods inherited from class databionics.esom.cooling.CachedCooling
fillCache, get
 
Methods inherited from class databionics.esom.cooling.Cooling
getAsInt
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static final org.apache.log4j.Logger log
interface to log4j system


diff

protected double diff
difference between succesive y values

Constructor Detail

LinearCooling

public LinearCooling(double start,
                     int steps,
                     double end)
Create a new linear cooling object

Parameters:
start - Initial value of the parameter
steps - Steps towards the final value of the parameter
end - Final value of the parameter
Method Detail

init

protected void init()
Initialize constants and the cache.

Overrides:
init in class CachedCooling
Parameters:
offset -

calculate

protected double calculate(int step)
Calculate the parameter value for this step. value(step) = start - step*(start-end)/steps

Specified by:
calculate in class Cooling
Parameters:
step - current step ([0..steps-1])


Copyright © 2005-2006 Databionics Research Group. All Rights Reserved.