Trait GASolution

Source
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§

Source

fn new() -> Self

Source

fn clone(&self) -> Self

Source

fn crossover(&self, other: &Self) -> Self

Source

fn mutate(&mut self, pMutation: f32)

Source

fn evaluate(&mut self) -> f32

Source

fn fitness(&self) -> f32

Source

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.

Implementors§