pub struct Zero<G: Genotype>(/* private fields */);
Expand description
placeholder for testing and bootstrapping, not really used in practice
Implementations§
Trait Implementations§
Source§impl<G: Genotype> Fitness for Zero<G>
impl<G: Genotype> Fitness for Zero<G>
type Genotype = G
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<G> Freeze for Zero<G>
impl<G> RefUnwindSafe for Zero<G>where
G: RefUnwindSafe,
impl<G> Send for Zero<G>
impl<G> Sync for Zero<G>
impl<G> Unpin for Zero<G>where
G: Unpin,
impl<G> UnwindSafe for Zero<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