pub struct Config {
pub population_size: usize,
pub elitism: usize,
pub crossover_rate: f64,
pub mutation_rate: f64,
pub scheme: Scheme,
}Expand description
Parameters of a Ga run.
Fields§
§population_size: usizeThe number of individuals, at least 2.
elitism: usizeGenerational scheme: the number of best individuals copied unchanged into the next
generation (clamped to population_size - 1, so every generation breeds). Ignored by
the steady-state scheme, which is elitist by construction.
crossover_rate: f64The probability that a pair of parents is recombined; otherwise the children are copies.
mutation_rate: f64The probability that a child is mutated at all; the mutation operator decides how much (for example a per-gene rate).
scheme: SchemeGenerational or steady state.
Trait Implementations§
impl Copy for Config
impl StructuralPartialEq for Config
Auto Trait Implementations§
impl Forget for Config
impl Freeze for Config
impl Move for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more