Struct necsim_impls_no_std::cogs::active_lineage_sampler::resuming::RestartFixUpActiveLineageSampler
source · pub struct RestartFixUpActiveLineageSampler<M: MathsCore, H: Habitat<M>, G: RngCore<M>, S: LineageStore<M, H>, X: EmigrationExit<M, H, G, S>, D: DispersalSampler<M, H, G>, C: CoalescenceSampler<M, H, S>, T: TurnoverRate<M, H>, N: SpeciationProbability<M, H>, E: EventSampler<M, H, G, S, X, D, C, T, N>, I: ImmigrationEntry<M>, A: ActiveLineageSampler<M, H, G, S, X, D, C, T, N, E, I>> { /* private fields */ }
Implementations§
source§impl<M: MathsCore, H: Habitat<M>, G: RngCore<M>, S: LineageStore<M, H>, X: EmigrationExit<M, H, G, S>, D: DispersalSampler<M, H, G>, C: CoalescenceSampler<M, H, S>, T: TurnoverRate<M, H>, N: SpeciationProbability<M, H>, E: EventSampler<M, H, G, S, X, D, C, T, N>, I: ImmigrationEntry<M>, A: ActiveLineageSampler<M, H, G, S, X, D, C, T, N, E, I>> RestartFixUpActiveLineageSampler<M, H, G, S, X, D, C, T, N, E, I, A>
impl<M: MathsCore, H: Habitat<M>, G: RngCore<M>, S: LineageStore<M, H>, X: EmigrationExit<M, H, G, S>, D: DispersalSampler<M, H, G>, C: CoalescenceSampler<M, H, S>, T: TurnoverRate<M, H>, N: SpeciationProbability<M, H>, E: EventSampler<M, H, G, S, X, D, C, T, N>, I: ImmigrationEntry<M>, A: ActiveLineageSampler<M, H, G, S, X, D, C, T, N, E, I>> RestartFixUpActiveLineageSampler<M, H, G, S, X, D, C, T, N, E, I, A>
Trait Implementations§
source§impl<M: MathsCore, H: Habitat<M>, G: RngCore<M>, S: LineageStore<M, H>, X: EmigrationExit<M, H, G, S>, D: DispersalSampler<M, H, G>, C: CoalescenceSampler<M, H, S>, T: TurnoverRate<M, H>, N: SpeciationProbability<M, H>, E: EventSampler<M, H, G, S, X, D, C, T, N>, I: ImmigrationEntry<M>, A: ActiveLineageSampler<M, H, G, S, X, D, C, T, N, E, I>> ActiveLineageSampler<M, H, G, S, X, D, C, T, N, E, I> for RestartFixUpActiveLineageSampler<M, H, G, S, X, D, C, T, N, E, I, A>
impl<M: MathsCore, H: Habitat<M>, G: RngCore<M>, S: LineageStore<M, H>, X: EmigrationExit<M, H, G, S>, D: DispersalSampler<M, H, G>, C: CoalescenceSampler<M, H, S>, T: TurnoverRate<M, H>, N: SpeciationProbability<M, H>, E: EventSampler<M, H, G, S, X, D, C, T, N>, I: ImmigrationEntry<M>, A: ActiveLineageSampler<M, H, G, S, X, D, C, T, N, E, I>> ActiveLineageSampler<M, H, G, S, X, D, C, T, N, E, I> for RestartFixUpActiveLineageSampler<M, H, G, S, X, D, C, T, N, E, I, A>
source§fn pop_active_lineage_and_event_time<F: FnOnce(PositiveF64) -> ControlFlow<(), ()>>(
&mut self,
simulation: &mut PartialSimulation<M, H, G, S, X, D, C, T, N, E>,
rng: &mut G,
early_peek_stop: F
) -> Option<(Lineage, PositiveF64)>
fn pop_active_lineage_and_event_time<F: FnOnce(PositiveF64) -> ControlFlow<(), ()>>( &mut self, simulation: &mut PartialSimulation<M, H, G, S, X, D, C, T, N, E>, rng: &mut G, early_peek_stop: F ) -> Option<(Lineage, PositiveF64)>
§Contracts
Post-condition - debug: removes an active lineage if Some(_)
returned
match ret { Some(_) => { self.number_active_lineages() == old(self.number_active_lineages()) - 1 }, None => { self.number_active_lineages() == old(self.number_active_lineages()) }, }
Post-condition - debug: returns None
if no lineages are left
old(self.number_active_lineages()) != 0 || ret.is_none()
Post-condition - debug: updates the time of the last event
if let Some((ref _lineage, event_time)) = ret { self.get_last_event_time() == event_time } else { true }
source§fn push_active_lineage(
&mut self,
lineage: Lineage,
simulation: &mut PartialSimulation<M, H, G, S, X, D, C, T, N, E>,
rng: &mut G
)
fn push_active_lineage( &mut self, lineage: Lineage, simulation: &mut PartialSimulation<M, H, G, S, X, D, C, T, N, E>, rng: &mut G )
§Contracts
Post-condition - debug: adds an active lineage
self.number_active_lineages() == old(self.number_active_lineages()) + 1
Post-condition - debug: updates the time of the last event
self.get_last_event_time() == old(lineage.last_event_time)
type LineageIterator<'a> = impl Iterator<Item = &'a Lineage> where H: 'a, G: 'a, S: 'a, X: 'a, D: 'a, C: 'a, T: 'a, N: 'a, E: 'a, I: 'a, A: 'a
fn number_active_lineages(&self) -> usize
fn iter_active_lineages_ordered<'a>( &'a self, habitat: &'a H, lineage_store: &'a S ) -> Self::LineageIterator<'a>
fn get_last_event_time(&self) -> NonNegativeF64
source§impl<M: MathsCore, H: Habitat<M>, G: RngCore<M>, S: LineageStore<M, H>, X: EmigrationExit<M, H, G, S>, D: DispersalSampler<M, H, G>, C: CoalescenceSampler<M, H, S>, T: TurnoverRate<M, H>, N: SpeciationProbability<M, H>, E: EventSampler<M, H, G, S, X, D, C, T, N>, I: ImmigrationEntry<M>, A: ActiveLineageSampler<M, H, G, S, X, D, C, T, N, E, I>> Backup for RestartFixUpActiveLineageSampler<M, H, G, S, X, D, C, T, N, E, I, A>
impl<M: MathsCore, H: Habitat<M>, G: RngCore<M>, S: LineageStore<M, H>, X: EmigrationExit<M, H, G, S>, D: DispersalSampler<M, H, G>, C: CoalescenceSampler<M, H, S>, T: TurnoverRate<M, H>, N: SpeciationProbability<M, H>, E: EventSampler<M, H, G, S, X, D, C, T, N>, I: ImmigrationEntry<M>, A: ActiveLineageSampler<M, H, G, S, X, D, C, T, N, E, I>> Backup for RestartFixUpActiveLineageSampler<M, H, G, S, X, D, C, T, N, E, I, A>
unsafe fn backup_unchecked(&self) -> Self
fn backup(&self) -> BackedUp<Self>
source§impl<M: Debug + MathsCore, H: Debug + Habitat<M>, G: Debug + RngCore<M>, S: Debug + LineageStore<M, H>, X: Debug + EmigrationExit<M, H, G, S>, D: Debug + DispersalSampler<M, H, G>, C: Debug + CoalescenceSampler<M, H, S>, T: Debug + TurnoverRate<M, H>, N: Debug + SpeciationProbability<M, H>, E: Debug + EventSampler<M, H, G, S, X, D, C, T, N>, I: Debug + ImmigrationEntry<M>, A: Debug + ActiveLineageSampler<M, H, G, S, X, D, C, T, N, E, I>> Debug for RestartFixUpActiveLineageSampler<M, H, G, S, X, D, C, T, N, E, I, A>
impl<M: Debug + MathsCore, H: Debug + Habitat<M>, G: Debug + RngCore<M>, S: Debug + LineageStore<M, H>, X: Debug + EmigrationExit<M, H, G, S>, D: Debug + DispersalSampler<M, H, G>, C: Debug + CoalescenceSampler<M, H, S>, T: Debug + TurnoverRate<M, H>, N: Debug + SpeciationProbability<M, H>, E: Debug + EventSampler<M, H, G, S, X, D, C, T, N>, I: Debug + ImmigrationEntry<M>, A: Debug + ActiveLineageSampler<M, H, G, S, X, D, C, T, N, E, I>> Debug for RestartFixUpActiveLineageSampler<M, H, G, S, X, D, C, T, N, E, I, A>
Auto Trait Implementations§
impl<M, H, G, S, X, D, C, T, N, E, I, A> Freeze for RestartFixUpActiveLineageSampler<M, H, G, S, X, D, C, T, N, E, I, A>where
A: Freeze,
impl<M, H, G, S, X, D, C, T, N, E, I, A> RefUnwindSafe for RestartFixUpActiveLineageSampler<M, H, G, S, X, D, C, T, N, E, I, A>where
A: RefUnwindSafe,
M: RefUnwindSafe,
H: RefUnwindSafe,
G: RefUnwindSafe,
S: RefUnwindSafe,
X: RefUnwindSafe,
D: RefUnwindSafe,
C: RefUnwindSafe,
T: RefUnwindSafe,
N: RefUnwindSafe,
E: RefUnwindSafe,
I: RefUnwindSafe,
impl<M, H, G, S, X, D, C, T, N, E, I, A> Send for RestartFixUpActiveLineageSampler<M, H, G, S, X, D, C, T, N, E, I, A>
impl<M, H, G, S, X, D, C, T, N, E, I, A> Sync for RestartFixUpActiveLineageSampler<M, H, G, S, X, D, C, T, N, E, I, A>
impl<M, H, G, S, X, D, C, T, N, E, I, A> Unpin for RestartFixUpActiveLineageSampler<M, H, G, S, X, D, C, T, N, E, I, A>
impl<M, H, G, S, X, D, C, T, N, E, I, A> UnwindSafe for RestartFixUpActiveLineageSampler<M, H, G, S, X, D, C, T, N, E, I, A>where
A: UnwindSafe,
M: UnwindSafe,
H: UnwindSafe,
G: UnwindSafe,
S: UnwindSafe,
X: UnwindSafe,
D: UnwindSafe,
C: UnwindSafe,
T: UnwindSafe,
N: UnwindSafe,
E: UnwindSafe,
I: 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
§impl<T> ExtractDiscriminant for T
impl<T> ExtractDiscriminant for T
§type Discriminant = <T as ExtractDiscriminantSpec<<T as DiscriminantKind>::Discriminant>>::Ty
type Discriminant = <T as ExtractDiscriminantSpec<<T as DiscriminantKind>::Discriminant>>::Ty
The type of the discriminant, which must satisfy the trait bounds
required by
core::mem::Discriminant
. Read more