Interface FitnessFunction.Double<T extends Copyable<T>>

Type Parameters:
T - The type of object under optimization.
All Superinterfaces:
All Known Implementing Classes:
InverseCostFitnessFunction, NegativeCostFitnessFunction
Enclosing interface:
FitnessFunction<T extends Copyable<T>>

public static interface FitnessFunction.Double<T extends Copyable<T>> extends FitnessFunction<T>
Fitness function interface for double-valued fitnesses. Implement this interface to provide a fitness function for use by genetic algorithms and other forms of evolutionary computation. Some of the SelectionOperator classes of this library assume that fitness values are positive, so for maximal compatibility, you should design your fitness function such that fitness values are always positive.
  • Method Details

    • fitness

      double fitness(T candidate)
      Computes the fitness of a candidate solution to a problem, for use by genetic algorithms and other evolutionary algorithms.
      candidate - The solution whose fitness is to be evaluated.
      the fitness of candidate