Trait genevo::genetic::Fitness [] [src]

pub trait Fitness: Eq + Ord + Clone + Debug + Sized {
    fn zero() -> Self;
fn abs_diff(&self, other: &Self) -> Self; }

A Fitness value is used to determine the quality of a Genotype. Fitness values should have an ordering, also called ranking.

Make sure the following statement holds: A Genotype with a Fitness value of f1 performs better than another Genotype with a Fitness value of f2 if f1 > f2.

For multi-objective Fitness values either operator::GeneticOperators suitable for multi-objective optimization are used or the implementation of the multi-objective Fitness value additionally implements the AsScalar trait. Using single-objective optimization for multi-objective problems has some drawbacks though.

Required Methods

Returns the zero value of this Fitness value. The internal value should be 0.

Returns the absolute difference between this Fitness value and the other one, i.e. result = |self| - |other|

Implementations on Foreign Types

impl Fitness for i8
[src]

[src]

[src]

impl Fitness for i16
[src]

[src]

[src]

impl Fitness for i32
[src]

[src]

[src]

impl Fitness for i64
[src]

[src]

[src]

impl Fitness for isize
[src]

[src]

[src]

impl Fitness for u8
[src]

[src]

[src]

impl Fitness for u16
[src]

[src]

[src]

impl Fitness for u32
[src]

[src]

[src]

impl Fitness for u64
[src]

[src]

[src]

impl Fitness for usize
[src]

[src]

[src]

Implementors