use genomes::Sequence;
use rand::Rng;
pub trait SelectOperator<G, O>
where
G: Sequence,
O: Clone + Ord,
{
fn select<R: Rng>(
&self,
population: &Vec<(O, G)>,
k: usize,
rng: &mut R,
) -> Vec<G>;
}
pub trait MutateOperator<G>
where
G: Sequence,
{
fn mutate<R: Rng>(&self, indv: &G, rng: &mut R) -> G;
}
pub trait CrossoverOperator<G>
where
G: Sequence,
{
fn crossover<R: Rng>(&self, g1: &G, g2: &G, rng: &mut R) -> (G, G);
}