1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use crate::engines::genome::genes::gene::Gene;

use super::mutate::Mutate;

pub struct Mutator {
    pub rate: f32,
}

impl Mutator {
    pub fn new(rate: f32) -> Self {
        Self { rate }
    }
}

impl<G, A> Mutate<G, A> for Mutator where G: Gene<G, A> {
    fn mutate_rate(&self) -> f32 {
        self.rate
    }
}