pub struct ExtensionMassExtinction {
pub uniformity_threshold: f32,
pub survival_rate: f32,
}
Expand description
Simulates a cambrian explosion. The controlling metric is fitness score uniformity in the population (a fraction of the population which has the same fitness score). When this uniformity passes the threshold, the population is randomly reduced using the survival_rate (fraction of population).
Fields§
§uniformity_threshold: f32
§survival_rate: f32
Implementations§
Trait Implementations§
source§impl Clone for MassExtinction
impl Clone for MassExtinction
source§fn clone(&self) -> MassExtinction
fn clone(&self) -> MassExtinction
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for MassExtinction
impl Debug for MassExtinction
source§impl Extension for MassExtinction
impl Extension for MassExtinction
fn call<G: Genotype, R: Rng>( &mut self, _genotype: &G, evolve_config: &EvolveConfig, _evolve_state: &EvolveState<G>, population: &mut Population<G>, rng: &mut R, )
source§impl From<MassExtinction> for Wrapper
impl From<MassExtinction> for Wrapper
source§fn from(extension: ExtensionMassExtinction) -> Self
fn from(extension: ExtensionMassExtinction) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for MassExtinction
impl RefUnwindSafe for MassExtinction
impl Send for MassExtinction
impl Sync for MassExtinction
impl Unpin for MassExtinction
impl UnwindSafe for MassExtinction
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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