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§
Sourcefn should_terminate(&self, state: &EvolutionState<'_, G, F>) -> bool
fn should_terminate(&self, state: &EvolutionState<'_, G, F>) -> bool
Check if evolution should terminate
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".