pub struct Solution {
    pub fitness: f64,
    pub stock_pieces: Vec<ResultStockPiece>,
    /* private fields */
}
Expand description

A valid solution to an optimization.

Fields

fitness: f64

Fitness score for this solution. Ranges between 0.0 and 1.0 inclusive, with 1.0 being a perfect solution with no waste.

stock_pieces: Vec<ResultStockPiece>

The stock pieces that were used for this solution, each containing the demand piece layout.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.