pub struct Config {
pub population_size: usize,
pub deme_size: usize,
pub offspring: usize,
pub crossover_rate: f64,
pub acceptance: Acceptance,
pub max_without_improvement: Option<u64>,
pub max_without_acceptance: Option<u64>,
}Expand description
Parameters of a Diffusion run.
Fields§
§population_size: usizeThe number of individuals on the ring, at least twice the deme size.
deme_size: usizeThe deme size (the individual and its neighbours), odd, at least 3; Jakob reports
7 to 11 as typical. An even value is rounded up.
offspring: usizeOffspring produced per mating; the best one competes for acceptance.
crossover_rate: f64The probability that a mating uses crossover (otherwise the offspring are mutants of the individual).
acceptance: AcceptanceThe acceptance rule.
max_without_improvement: Option<u64>Stop after this many consecutive generations in which no deme’s best improved.
max_without_acceptance: Option<u64>Stop after this many consecutive generations without an accepted offspring.
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