Trait genevo::genetic::AsScalar [] [src]

pub trait AsScalar {
    fn as_scalar(&self) -> f64;
}

In order to be able to use operator::GeneticOperators designed for single-objective optimization to be used for multi-objective Fitness values the struct implementing the Fitness trait must also implement this AsScalar trait.

The implementation will use a scalarization method to convert a multi-objective Fitness value into a scalar representation. A well-known method is calculating the weighted sum: F = Sum(W * f).

Required Methods

Returns a float value that represents this type in scalar form.

Implementations on Foreign Types

impl AsScalar for i8
[src]

[src]

impl AsScalar for i16
[src]

[src]

impl AsScalar for i32
[src]

[src]

impl AsScalar for i64
[src]

[src]

impl AsScalar for isize
[src]

[src]

impl AsScalar for u8
[src]

[src]

impl AsScalar for u16
[src]

[src]

impl AsScalar for u32
[src]

[src]

impl AsScalar for u64
[src]

[src]

impl AsScalar for usize
[src]

[src]

Implementors