Crossover

Trait Crossover 

Source
pub trait Crossover {
    // Required method
    fn crossover(a: &Self, b: &Self) -> Self;
}
Expand description

A trait for taking two items having the same type, and producing a thrid item of the same type, having a value being a mashup of the two parents. Such a thing is used in the genetic algorithm

Required Methods§

Source

fn crossover(a: &Self, b: &Self) -> Self

spawns a child from two parents

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.

Implementors§

Source§

impl<Insn: Copy> Crossover for Sequence<Insn>