scratch.scott.optimization
Class TestSimulatedAnnealer.TestConfiguration
java.lang.Object
scratch.scott.optimization.TestSimulatedAnnealer.TestConfiguration
- All Implemented Interfaces:
- Configuration
- Enclosing class:
- TestSimulatedAnnealer
public class TestSimulatedAnnealer.TestConfiguration
- extends Object
- implements Configuration
Method Summary |
double |
computeEnergy()
Computes the energy or fitness of the current configuration. |
Configuration |
melt(double temperature,
double maxTemp,
double minTemp)
Randomly perturbs the current configuration in some way. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TestSimulatedAnnealer.TestConfiguration
public TestSimulatedAnnealer.TestConfiguration(double xval)
computeEnergy
public double computeEnergy()
- Description copied from interface:
Configuration
- Computes the energy or fitness of the current configuration.
- Specified by:
computeEnergy
in interface Configuration
- Returns:
double
value representing the computed energy
melt
public Configuration melt(double temperature,
double maxTemp,
double minTemp)
- Description copied from interface:
Configuration
- Randomly perturbs the current configuration in some way.
- Specified by:
melt
in interface Configuration
- Parameters:
temperature
- the current temperature of the systemmaxTemp
- the highest temperature the system can go tominTemp
- the lowest temperature the system can go to
- Returns:
- the newly perturbed configuration