T
- type of the value (dependent on the problem)public interface Solution<T>
extends java.io.Serializable
Solution is a specific value from the search domain and its fitness
Modifier and Type | Method and Description |
---|---|
double |
fitnessValue()
Returns the fitness of this solution.
|
T |
unwrap()
Returns the real value of this solution.
|
Solution<T> |
withFitness(double fitness)
Updates the fitness of this solution.
|
double fitnessValue()
Returns the fitness of this solution. If the fitness was not computed, the returned value will be Double#NaN
.
Solution<T> withFitness(double fitness)
Updates the fitness of this solution.
This function returns a new instance.
fitness
- new fitness valueT unwrap()
Returns the real value of this solution.