pub trait CrossoverOperator<G: EvolutionaryGenome>: Send + Sync {
// Required method
fn crossover<R: Rng>(
&self,
parent1: &G,
parent2: &G,
rng: &mut R,
) -> OperatorResult<(G, G)>;
// Provided method
fn crossover_probability(&self) -> f64 { ... }
}Expand description
Crossover operator trait
Combines genetic material from two parents to create offspring.
Required Methods§
Provided Methods§
Sourcefn crossover_probability(&self) -> f64
fn crossover_probability(&self) -> f64
Get the probability of crossover being applied
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.