pub trait Codex<G, A, T>where
G: Gene<G, A>,{
// Required methods
fn encode(&self) -> Genotype<G, A>;
fn decode(&self, genotype: &Genotype<G, A>) -> T;
// Provided methods
fn spawn(&self, num: i32) -> Vec<T> { ... }
fn spawn_genotypes(&self, num: i32) -> Vec<Genotype<G, A>> { ... }
fn spawn_population(&self, num: i32) -> Population<G, A> { ... }
}