[][src]Trait evolution_rs::Instance

pub trait Instance {
    fn validate(&self) -> u64;
fn evaluate(&self) -> u64;
fn cross_over(&self, other: &Self, probability: f32) -> (Self, Self)
    where
        Self: Sized
;
fn mutate(&mut self, probability: f32); }

Required methods

fn validate(&self) -> u64

Returns non-negative validity for this Instance.alloc Valid instances have validity 0.

fn evaluate(&self) -> u64

Returns nonnegative score for this instance

fn cross_over(&self, other: &Self, probability: f32) -> (Self, Self) where
    Self: Sized

Performs cross-over between this and another instance

fn mutate(&mut self, probability: f32)

Performs mutation on this instance

Loading content...

Implementors

Loading content...