pub struct Score { /* private fields */ }
Expand description
A score is a value that can be used to compare the fitness of two individuals and represents
the ‘fitness’ of an individual within the genetic algorithm.
The score can be a single value or multiple values, depending on the problem being solved.
For ease of use the Score
struct provides methods
to convert the score to a single value, an integer, a string, or a vector of f32
values.
Note: The reason it is a Vec is for multi-objective optimization problems. This allows for multiple fitness values to be returned from the fitness function.
Implementations§
Trait Implementations§
Source§impl PartialOrd for Score
impl PartialOrd for Score
impl StructuralPartialEq for Score
Auto Trait Implementations§
impl Freeze for Score
impl RefUnwindSafe for Score
impl Send for Score
impl Sync for Score
impl Unpin for Score
impl UnwindSafe for Score
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more