pub trait GASolution {
// Required methods
fn new() -> Self;
fn clone(&self) -> Self;
fn crossover(&self, other: &Self) -> Self;
fn mutate(&mut self, pMutation: f32);
fn evaluate(&mut self) -> f32;
fn fitness(&self) -> f32;
fn score(&self) -> f32;
}Expand description
Genetic Algorithm Solution
Required Methods§
fn new() -> Self
fn clone(&self) -> Self
fn crossover(&self, other: &Self) -> Self
fn mutate(&mut self, pMutation: f32)
fn evaluate(&mut self) -> f32
fn fitness(&self) -> f32
fn score(&self) -> f32
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.