Struct revonet::problem::RastriginProblem
[−]
[src]
pub struct RastriginProblem;
Sample problem representing Rastrigin function.
Trait Implementations
impl Problem for RastriginProblem
[src]
fn compute<T: Individual>(&self, ind: &mut T) -> f32
Computes fitness value for a given individual. Read more
fn is_solution(&self, value: f32) -> bool
Returns whether given fitness value is enough to be a solution. Read more
fn get_random_individual<T: Individual, R: Rng>(
&self,
size: usize,
rng: &mut R
) -> T
&self,
size: usize,
rng: &mut R
) -> T
Generate random individual for the problem. Default implementation creates a real-coded individual with the number of genes equal to size
Read more