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

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

Implementors