pub struct CountTrue;
Expand description
placeholder for testing and bootstrapping, not really used in practice
Trait Implementations§
Source§impl Fitness for CountTrue
impl Fitness for CountTrue
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>>( &mut self, state: &mut S, genotype: &Self::Genotype, thread_local: Option<&ThreadLocal<RefCell<Self>>>, )
fn call_for_state_chromosome<S: StrategyState<Self::Genotype>>( &mut self, state: &mut S, genotype: &Self::Genotype, )
Source§fn call_for_population(
&mut self,
population: &mut FitnessPopulation<Self>,
genotype: &Self::Genotype,
thread_local: Option<&ThreadLocal<RefCell<Self>>>,
)
fn call_for_population( &mut self, population: &mut FitnessPopulation<Self>, genotype: &Self::Genotype, thread_local: Option<&ThreadLocal<RefCell<Self>>>, )
Pass thread_local for external control of fitness caching in multithreading
fn call_for_chromosome( &mut self, chromosome: &mut FitnessChromosome<Self>, genotype: &Self::Genotype, )
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 CountTrue
impl RefUnwindSafe for CountTrue
impl Send for CountTrue
impl Sync for CountTrue
impl Unpin for CountTrue
impl UnwindSafe for CountTrue
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