Struct necsim_core::simulation::Simulation

source ·
#[repr(C)]
pub struct Simulation<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>> Simulation<M, H, G, S, X, D, C, T, N, E, I, A>

source

pub fn with_mut_split_active_lineage_sampler_and_rng_and_migration_balance<Q, F: FnOnce(&mut A, &mut PartialSimulation<M, H, G, S, X, D, C, T, N, E>, &mut G, &mut Wrapping<u64>) -> Q>( &mut self, func: F ) -> Q

source

pub fn with_mut_split_event_sampler_and_rng<Q, F: FnOnce(&mut E, &PartialSimulation<M, H, G, S, X, D, C, T, N>, &mut G) -> Q>( &mut self, func: F ) -> Q

source

pub fn rng_mut(&mut self) -> &mut G

source

pub fn active_lineage_sampler(&self) -> &A

source

pub fn active_lineage_sampler_mut(&mut self) -> &mut A

source

pub fn lineage_store(&self) -> &S

source

pub fn lineage_store_mut(&mut self) -> &mut S

source

pub fn event_sampler(&self) -> &E

source

pub fn event_sampler_mut(&mut self) -> &mut E

source

pub fn speciation_probability(&self) -> &N

source

pub fn turnover_rate(&self) -> &T

source

pub fn habitat(&self) -> &H

source

pub fn dispersal_sampler(&self) -> &D

source

pub fn coalescence_sampler(&self) -> &C

source

pub fn emigration_exit(&self) -> &X

source

pub fn emigration_exit_mut(&mut self) -> &mut X

source

pub fn immigration_entry_mut(&mut self) -> &mut I

source

pub fn migration_portals_mut(&mut self) -> (&mut X, &mut I)

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>> Simulation<M, H, G, S, X, D, C, T, N, E, I, A>

source

pub fn is_done(&self) -> bool

source

pub fn get_balanced_remaining_work(&self) -> Wrapping<u64>

source

pub fn simulate_incremental_early_stop<F: FnMut(&Self, u64, PositiveF64, &P) -> ControlFlow<(), ()>, P: Reporter>( &mut self, early_stop: F, reporter: &mut P ) -> (NonNegativeF64, u64)

source

pub fn simulate<P: Reporter>(self, reporter: &mut P) -> (NonNegativeF64, u64)

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>> Backup for Simulation<M, H, G, S, X, D, C, T, N, E, I, A>

source§

unsafe fn backup_unchecked(&self) -> Self

source§

fn backup(&self) -> BackedUp<Self>

source§

impl<M, H, G, S, X, D, C, T, N, E, I, A> ComputeTypeSet for Simulation<M, H, G, S, X, D, C, T, N, E, I, A>
where M: ComputeTypeSet + MathsCore, H: ComputeTypeSet + Habitat<M>, G: ComputeTypeSet + RngCore<M>, S: ComputeTypeSet + LineageStore<M, H>, X: ComputeTypeSet + EmigrationExit<M, H, G, S>, D: ComputeTypeSet + DispersalSampler<M, H, G>, C: ComputeTypeSet + CoalescenceSampler<M, H, S>, T: ComputeTypeSet + TurnoverRate<M, H>, N: ComputeTypeSet + SpeciationProbability<M, H>, E: ComputeTypeSet + EventSampler<M, H, G, S, X, D, C, T, N>, I: ComputeTypeSet + ImmigrationEntry<M>, A: ComputeTypeSet + ActiveLineageSampler<M, H, G, S, X, D, C, T, N, E, I>,

§

type Output<__TypeSetRest: ExpandTypeSet> = <<<<<<<<<<<<<__TypeSetRest as ComputeSet>::Output<Wrapping<u64>> as ComputeSet>::Output<I> as ComputeSet>::Output<G> as ComputeSet>::Output<A> as ComputeSet>::Output<E> as ComputeSet>::Output<X> as ComputeSet>::Output<N> as ComputeSet>::Output<T> as ComputeSet>::Output<C> as ComputeSet>::Output<D> as ComputeSet>::Output<S> as ComputeSet>::Output<H> as ComputeSet>::Output<PhantomData<M>>

Extend the set T into a (larger) set containing also the types this type links to. Read more
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 Simulation<M, H, G, S, X, D, C, T, N, E, I, A>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<M: MathsCore, H, G, S, X, D, C, T, N, E, I, A> RustToCuda for Simulation<M, H, G, S, X, D, C, T, N, E, I, A>
where A: RustToCuda + ActiveLineageSampler<M, H, G, S, X, D, C, T, N, E, I>, H: RustToCuda + Habitat<M>, G: RustToCuda + RngCore<M>, S: RustToCuda + LineageStore<M, H>, X: RustToCuda + EmigrationExit<M, H, G, S>, D: RustToCuda + DispersalSampler<M, H, G>, C: RustToCuda + CoalescenceSampler<M, H, S>, T: RustToCuda + TurnoverRate<M, H>, N: RustToCuda + SpeciationProbability<M, H>, E: RustToCuda + EventSampler<M, H, G, S, X, D, C, T, N>, I: RustToCuda + ImmigrationEntry<M>,

source§

impl<M: MathsCore, H, G, S, X, D, C, T, N, E, I, A> RustToCudaAsync for Simulation<M, H, G, S, X, D, C, T, N, E, I, A>

source§

impl<M, H, G, S, X, D, C, T, N, E, I, A> TypeLayout for Simulation<M, H, G, S, X, D, C, T, N, E, I, A>
where M: TypeLayout + MathsCore, H: TypeLayout + Habitat<M>, G: TypeLayout + RngCore<M>, S: TypeLayout + LineageStore<M, H>, X: TypeLayout + EmigrationExit<M, H, G, S>, D: TypeLayout + DispersalSampler<M, H, G>, C: TypeLayout + CoalescenceSampler<M, H, S>, T: TypeLayout + TurnoverRate<M, H>, N: TypeLayout + SpeciationProbability<M, H>, E: TypeLayout + EventSampler<M, H, G, S, X, D, C, T, N>, I: TypeLayout + ImmigrationEntry<M>, A: TypeLayout + ActiveLineageSampler<M, H, G, S, X, D, C, T, N, E, I>,

§

type Inhabited = <And<<PhantomData<M> as TypeLayout>::Inhabited, <And<<H as TypeLayout>::Inhabited, <And<<S as TypeLayout>::Inhabited, <And<<D as TypeLayout>::Inhabited, <And<<C as TypeLayout>::Inhabited, <And<<T as TypeLayout>::Inhabited, <And<<N as TypeLayout>::Inhabited, <And<<X as TypeLayout>::Inhabited, <And<<E as TypeLayout>::Inhabited, <And<<A as TypeLayout>::Inhabited, <And<<G as TypeLayout>::Inhabited, <And<<I as TypeLayout>::Inhabited, <And<<Wrapping<u64> as TypeLayout>::Inhabited, Inhabited> as ComputeInhabited>::Output> as ComputeInhabited>::Output> as ComputeInhabited>::Output> as ComputeInhabited>::Output> as ComputeInhabited>::Output> as ComputeInhabited>::Output> as ComputeInhabited>::Output> as ComputeInhabited>::Output> as ComputeInhabited>::Output> as ComputeInhabited>::Output> as ComputeInhabited>::Output> as ComputeInhabited>::Output> as ComputeInhabited>::Output

Marker type for whether the type is inhabited or uninhabited. The associated type must be either [inhabited::Inhabited] or [inhabited::Uninhabited].
source§

const TYPE_LAYOUT: TypeLayoutInfo<'static> = _

Shallow layout of the type.

Auto Trait Implementations§

§

impl<M, H, G, S, X, D, C, T, N, E, I, A> Freeze for Simulation<M, H, G, S, X, D, C, T, N, E, I, A>
where H: Freeze, S: Freeze, D: Freeze, C: Freeze, T: Freeze, N: Freeze, X: Freeze, E: Freeze, A: Freeze, G: Freeze, I: Freeze,

§

impl<M, H, G, S, X, D, C, T, N, E, I, A> RefUnwindSafe for Simulation<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> Send for Simulation<M, H, G, S, X, D, C, T, N, E, I, A>
where H: Send, S: Send, D: Send, C: Send, T: Send, N: Send, X: Send, E: Send, A: Send, I: Send,

§

impl<M, H, G, S, X, D, C, T, N, E, I, A> Sync for Simulation<M, H, G, S, X, D, C, T, N, E, I, A>
where H: Sync, S: Sync, D: Sync, C: Sync, T: Sync, N: Sync, X: Sync, E: Sync, A: Sync, G: Sync, I: Sync,

§

impl<M, H, G, S, X, D, C, T, N, E, I, A> Unpin for Simulation<M, H, G, S, X, D, C, T, N, E, I, A>
where H: Unpin, S: Unpin, D: Unpin, C: Unpin, T: Unpin, N: Unpin, X: Unpin, E: Unpin, A: Unpin, G: Unpin, I: Unpin, M: Unpin,

§

impl<M, H, G, S, X, D, C, T, N, E, I, A> UnwindSafe for Simulation<M, H, G, S, X, D, C, T, N, E, I, A>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> ExtractDiscriminant for T

§

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
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> LendToCuda for T
where T: RustToCuda,

source§

fn lend_to_cuda<O, E, F>(&self, inner: F) -> Result<O, E>

Lends an immutable borrow of &self to CUDA: Read more
source§

fn lend_to_cuda_mut<O, E, F>(&mut self, inner: F) -> Result<O, E>

Lends a mutable borrow of &mut self to CUDA iff Self is SafeMutableAliasing: Read more
source§

fn move_to_cuda<O, E, F>(self, inner: F) -> Result<O, E>

Moves self to CUDA iff Self is StackOnly. Read more
source§

impl<T> LendToCudaAsync for T
where T: RustToCudaAsync,

source§

fn lend_to_cuda_async<'stream, O, E, F>( &self, stream: Stream<'stream>, inner: F ) -> Result<O, E>
where E: From<CudaError>, F: FnOnce(Async<'_, 'stream, HostAndDeviceConstRef<'_, DeviceAccessible<<T as RustToCuda>::CudaRepresentation>>>) -> Result<O, E>, T: Sync,

Lends an immutable copy of &self to CUDA: Read more
source§

fn lend_to_cuda_mut_async<'a, 'stream, O, E, F, S>( this: OwningRefMut<'a, Box<S>, T>, stream: Stream<'stream>, inner: F ) -> Result<(Async<'a, 'stream, OwningRefMut<'a, Box<S>, T>, Box<dyn FnOnce(&mut T) -> Result<(), CudaError> + 'a>>, O), E>
where E: From<CudaError>, F: for<'b> FnOnce(Async<'b, 'stream, HostAndDeviceMutRef<'_, DeviceAccessible<<T as RustToCuda>::CudaRepresentation>>>) -> Result<O, E>, S: 'a, T: Sync + SafeMutableAliasing,

Lends a mutable borrow of &mut self to CUDA iff Self is SafeMutableAliasing: Read more
source§

fn move_to_cuda_async<'stream, O, E, F>( self, stream: Stream<'stream>, inner: F ) -> Result<O, E>

Moves self to CUDA iff self is StackOnly. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> TypeGraphLayout for T
where T: TypeLayout + ComputeTypeSet,

§

const TYPE_GRAPH: TypeLayoutGraph<'static> = _

Shallow layout of the type.
§

impl<T> Erased for T

source§

impl<T> PortableBitSemantics for T
where T: PortableBitSemantics + ?Sized,

source§

impl<T> StackOnly for T
where T: StackOnly,