use rand::Rng;
use genomes::Sequence;
use ops::traits::SelectOperator;
use ops::traits::CrossoverOperator;
use ops::traits::MutateOperator;
pub trait EvolutionaryAlgorithm<G, S, C, M, E, R, O>
where
G: Sequence,
S: SelectOperator<G, O>,
C: CrossoverOperator<G>,
M: MutateOperator<G>,
E: Fn(&G) -> O,
R: Rng,
O: Ord + Clone,
{
fn initialize<F>(&mut self, n: usize, init_fn: F)
where
F: Fn() -> G;
fn next(&mut self) -> Vec<G>;
fn population(&self) -> Vec<G>;
fn is_done(&self) -> bool;
}