Struct rsgenetic::sim::seq::Simulator [] [src]

pub struct Simulator<T: Phenotype> {
    // some fields omitted
}

A Simulator can run genetic algorithm simulations in a single thread.

Methods

impl<T: Phenotype> Simulator<T>

fn new(starting_population: Vec<Box<T>>, max_iters: i32, selection_type: SelectionType, fitness_type: FitnessType) -> Simulator<T>

Create a new Simulator.

  • max_iters indicates the maximum number of iterations to run before stopping.

Trait Implementations

impl<T: Phenotype> Simulation<T> for Simulator<T>

fn run(&mut self)

fn get(&self) -> Box<T>

impl<T: Phenotype> Selector<T> for Simulator<T>

fn selection_maximize(&self, count: u32) -> Parents<T>

fn selection_tournament(&self, num: u32, count: u32) -> Parents<T>

fn selection_stochastic(&self, count: u32) -> Parents<T>

fn kill_off(&mut self, count: usize)