Trait oxigen::stop_criteria::StopCriterion[][src]

pub trait StopCriterion: Send + Sync {
    fn stop(
        &self,
        generation: u64,
        progress: f64,
        n_solutions: usize,
        population_fitness: &[f64]
    ) -> bool; }

This trait can be implemented to provide a stop criterion of the genetic algorithm using the generation, the progress of the last executions, the number of solutions found and the fitness of all individuals of the population.

Required methods

fn stop(
    &self,
    generation: u64,
    progress: f64,
    n_solutions: usize,
    population_fitness: &[f64]
) -> bool
[src]

Returns if the genetic algorithm has finished according to the generation, the progress of the last generations, the number of solutions found and the fitness of the population.

Loading content...

Implementors

impl StopCriterion for StopCriteria[src]

Loading content...