- 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
(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.
fitness- A fitness value, which is assumed positive.
- A biased fitness.