pub struct CountTrueWithSleep {
pub micro_seconds: u64,
pub print_on_clone: bool,
}Expand description
placeholder for testing and benchmarking, not used in practice
Fields§
§micro_seconds: u64§print_on_clone: boolImplementations§
Trait Implementations§
Source§impl Clone for CountTrueWithSleep
impl Clone for CountTrueWithSleep
Source§impl Debug for CountTrueWithSleep
impl Debug for CountTrueWithSleep
Source§impl Fitness for CountTrueWithSleep
impl Fitness for CountTrueWithSleep
type Genotype = Binary
Source§fn calculate_for_chromosome(
&mut self,
chromosome: &FitnessChromosome<Self>,
_genotype: &Self::Genotype,
) -> Option<FitnessValue>
fn calculate_for_chromosome( &mut self, chromosome: &FitnessChromosome<Self>, _genotype: &Self::Genotype, ) -> Option<FitnessValue>
Optional interception point for client implementation
fn call_for_state_population<S: StrategyState<Self::Genotype>, C: StrategyConfig>( &mut self, genotype: &Self::Genotype, state: &mut S, config: &C, thread_local: Option<&ThreadLocal<RefCell<Self>>>, )
fn call_for_state_chromosome<S: StrategyState<Self::Genotype>, C: StrategyConfig>( &mut self, genotype: &Self::Genotype, state: &mut S, config: &C, )
Source§fn call_for_population(
&mut self,
population: &mut FitnessPopulation<Self>,
genotype: &Self::Genotype,
thread_local: Option<&ThreadLocal<RefCell<Self>>>,
cache: Option<&FitnessCache>,
)
fn call_for_population( &mut self, population: &mut FitnessPopulation<Self>, genotype: &Self::Genotype, thread_local: Option<&ThreadLocal<RefCell<Self>>>, cache: Option<&FitnessCache>, )
Pass thread_local for external control of fitness state in multithreading
fn call_for_chromosome( &mut self, chromosome: &mut FitnessChromosome<Self>, genotype: &Self::Genotype, cache: Option<&FitnessCache>, )
Source§fn calculate_for_population(
&mut self,
_population: &FitnessPopulation<Self>,
_genotype: &Self::Genotype,
) -> Vec<Option<FitnessValue>>
fn calculate_for_population( &mut self, _population: &FitnessPopulation<Self>, _genotype: &Self::Genotype, ) -> Vec<Option<FitnessValue>>
Optional interception point for client implementation. Read more
Auto Trait Implementations§
impl Freeze for CountTrueWithSleep
impl RefUnwindSafe for CountTrueWithSleep
impl Send for CountTrueWithSleep
impl Sync for CountTrueWithSleep
impl Unpin for CountTrueWithSleep
impl UnwindSafe for CountTrueWithSleep
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