pub struct HillClimbReporterSimple<G: HillClimbGenotype> {
pub buffer: Option<Vec<u8>>,
pub period: usize,
pub show_genes: bool,
pub show_equal_fitness: bool,
/* private fields */
}
Expand description
A Simple HillClimb reporter generic over Genotype. A report is triggered every period generations
Fields§
§buffer: Option<Vec<u8>>
§period: usize
§show_genes: bool
§show_equal_fitness: bool
Implementations§
Trait Implementations§
Source§impl<G: HillClimbGenotype> Default for Simple<G>
impl<G: HillClimbGenotype> Default for Simple<G>
Source§impl<G: HillClimbGenotype> StrategyReporter for Simple<G>
impl<G: HillClimbGenotype> StrategyReporter for Simple<G>
type Genotype = G
fn on_enter<S: StrategyState<Self::Genotype>, C: StrategyConfig>( &mut self, genotype: &Self::Genotype, state: &S, config: &C, )
fn on_exit<S: StrategyState<Self::Genotype>, C: StrategyConfig>( &mut self, _genotype: &Self::Genotype, state: &S, config: &C, )
fn on_new_generation<S: StrategyState<Self::Genotype>, C: StrategyConfig>( &mut self, _genotype: &Self::Genotype, state: &S, _config: &C, )
fn on_new_best_chromosome<S: StrategyState<Self::Genotype>, C: StrategyConfig>( &mut self, genotype: &Self::Genotype, state: &S, _config: &C, )
fn on_new_best_chromosome_equal_fitness<S: StrategyState<Self::Genotype>, C: StrategyConfig>( &mut self, genotype: &Self::Genotype, state: &S, _config: &C, )
fn flush(&mut self, _output: &mut Vec<u8>)
fn on_start<S: StrategyState<Self::Genotype>, C: StrategyConfig>( &mut self, _genotype: &Self::Genotype, _state: &S, _config: &C, )
fn on_finish<S: StrategyState<Self::Genotype>, C: StrategyConfig>( &mut self, _genotype: &Self::Genotype, _state: &S, _config: &C, )
fn on_extension_event<S: StrategyState<Self::Genotype>, C: StrategyConfig>( &mut self, _event: ExtensionEvent, _genotype: &Self::Genotype, _state: &S, _config: &C, )
fn on_mutate_event<S: StrategyState<Self::Genotype>, C: StrategyConfig>( &mut self, _event: MutateEvent, _genotype: &Self::Genotype, _state: &S, _config: &C, )
Auto Trait Implementations§
impl<G> Freeze for Simple<G>
impl<G> RefUnwindSafe for Simple<G>where
G: RefUnwindSafe,
impl<G> Send for Simple<G>
impl<G> Sync for Simple<G>
impl<G> Unpin for Simple<G>where
G: Unpin,
impl<G> UnwindSafe for Simple<G>where
G: UnwindSafe,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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