Interface FitnessBiasFunction

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface FitnessBiasFunction
This functional interface is used to provide a bias function to the BiasedFitnessProportionalSelection operator as well as the BiasedStochasticUniversalSampling operator.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    bias(double fitness)
    Applies a bias function to a fitness value.
  • Method Details

    • bias

      double bias(double fitness)
      Applies a bias function to a fitness value. Implementations must ensure that this method always returns positive values. It may assume that the parameter fitness is positive. Implementations must also be both threadsafe as well as thread efficient, because if evolutionary algorithms are used in combination with the parallel search functionality of the library, it may provide multiple threads with references to the same FitnessBiasFunction object. Ideally, implementations of this interface should avoid mutable state.
      Parameters:
      fitness - A fitness value, which is assumed positive.
      Returns:
      A biased fitness.