Record Class ConstantInitialTemperature<M extends Move<S,I>,S extends Solution<S,I>,I extends Instance>
java.lang.Object
java.lang.Record
es.urjc.etsii.grafo.improve.sa.initialt.ConstantInitialTemperature<M,S,I>
- Type Parameters:
M
- Move typeS
- Your solution classI
- Your instance class
- All Implemented Interfaces:
InitialTemperatureCalculator<M,
S, I>
public record ConstantInitialTemperature<M extends Move<S,I>,S extends Solution<S,I>,I extends Instance> (double initialTemperature)
extends Record
implements InitialTemperatureCalculator<M,S,I>
Constant initial temperature calculator.
-
Constructor Summary
ConstructorsConstructorDescriptionConstantInitialTemperature
(double initialTemperature) Creates an instance of aConstantInitialTemperature
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.double
Determines initial simulated annealing temperaturedouble
Returns the value of theinitialTemperature
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
ConstantInitialTemperature
public ConstantInitialTemperature(double initialTemperature) Creates an instance of aConstantInitialTemperature
record class.- Parameters:
initialTemperature
- the value for theinitialTemperature
record component
-
-
Method Details
-
initial
Description copied from interface:InitialTemperatureCalculator
Determines initial simulated annealing temperature -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='. -
initialTemperature
public double initialTemperature()Returns the value of theinitialTemperature
record component.- Returns:
- the value of the
initialTemperature
record component
-