Struct genetic_algorithm::strategy::evolve::EvolveState
source · pub struct EvolveState<G: Genotype> {
pub current_iteration: usize,
pub current_generation: usize,
pub best_generation: usize,
pub best_chromosome: Option<Chromosome<G>>,
}
Fields§
§current_iteration: usize
§current_generation: usize
§best_generation: usize
§best_chromosome: Option<Chromosome<G>>
Implementations§
source§impl<G: Genotype> EvolveState<G>
impl<G: Genotype> EvolveState<G>
pub fn best_chromosome(&self) -> Option<Chromosome<G>>
pub fn best_fitness_score(&self) -> Option<FitnessValue>
pub fn update_best_chromosome( &mut self, population: &Population<G>, evolve_config: &EvolveConfig, )
Trait Implementations§
source§impl<G: Genotype> Default for EvolveState<G>
impl<G: Genotype> Default for EvolveState<G>
Auto Trait Implementations§
impl<G> Freeze for EvolveState<G>
impl<G> RefUnwindSafe for EvolveState<G>
impl<G> Send for EvolveState<G>
impl<G> Sync for EvolveState<G>
impl<G> Unpin for EvolveState<G>
impl<G> UnwindSafe for EvolveState<G>
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
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more