evolutionary/mutation/random_resetting_mutation.rs
1// Random Resetting mutation is implemented for Real and Int chromosome types.
2
3/// # Substitute Mutation
4///
5/// For each gene in the real representation it has `mutation_rate` probability of replacing
6/// the gene with a random value within the range.
7#[derive(Clone)]
8pub struct RandomResettingMutation {
9 pub mutation_rate: f64,
10}
11
12impl Default for RandomResettingMutation {
13 fn default() -> Self {
14 RandomResettingMutation {
15 mutation_rate: 0.05,
16 }
17 }
18}