pub trait FitnessFunction<G, F>: Clone where
    G: Genotype,
    F: Fitness
{ fn fitness_of(&self, a: &G) -> F;
fn average(&self, a: &[F]) -> F;
fn highest_possible_fitness(&self) -> F;
fn lowest_possible_fitness(&self) -> F; }
Expand description

Defines the evaluation function to calculate the Fitness value of a Genotype based on its properties.

Required methods

Calculates the Fitness value of the given Genotype.

Calculates the average Fitness value of the given Fitness values.

Returns the very best of all theoretically possible Fitness values.

Returns the worst of all theoretically possible Fitness values. This is usually a value equivalent to zero.

Implementors