
xyz.thepathfinder.simulatedannealing.LinearDecayScheduler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of simulatedannealing Show documentation
Show all versions of simulatedannealing Show documentation
A simulated annealing framework.
package xyz.thepathfinder.simulatedannealing;
public class LinearDecayScheduler implements Scheduler {
final double initialTemperature;
final int totalSteps;
public LinearDecayScheduler(double initialTemperature, int totalSteps) {
this.initialTemperature = initialTemperature;
this.totalSteps = totalSteps;
}
@Override
public double getTemperature(int steps) {
return (1 - ((double) steps) / totalSteps) * initialTemperature;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy