Skip to main content

TerminationCriterion

Trait TerminationCriterion 

Source
pub trait TerminationCriterion<G: EvolutionaryGenome, F: FitnessValue = f64>: Send + Sync {
    // Required methods
    fn should_terminate(&self, state: &EvolutionState<'_, G, F>) -> bool;
    fn reason(&self) -> &'static str;
}
Expand description

Termination criterion trait

Required Methods§

Source

fn should_terminate(&self, state: &EvolutionState<'_, G, F>) -> bool

Check if evolution should terminate

Source

fn reason(&self) -> &'static str

Get a description of why termination occurred

Implementors§