Function revonet::ea::create_population [] [src]

pub fn create_population<T: Individual, P: Problem, R: Rng + Sized>(
    pop_size: u32,
    ind_size: u32,
    rng: &mut R,
    problem: &P
) -> Vec<T>

Creates population of given size. Uses problem.get_random_individual to generate a new individual

Arguments:

  • pop_size - population size.
  • ind_size - default size (number of genes) of individuals.
  • rng - reference to pre-initialized RNG.
  • problem - reference to the object implementing Problem trait.