pub struct SpatiallyImplicitHabitat<M: MathsCore> { /* private fields */ }
Implementations§
source§impl<M: MathsCore> SpatiallyImplicitHabitat<M>
impl<M: MathsCore> SpatiallyImplicitHabitat<M>
sourcepub fn new(
local_area: (OffByOneU32, OffByOneU32),
local_deme: NonZeroU32,
meta_area: (OffByOneU32, OffByOneU32),
meta_deme: NonZeroU32
) -> Self
pub fn new( local_area: (OffByOneU32, OffByOneU32), local_deme: NonZeroU32, meta_area: (OffByOneU32, OffByOneU32), meta_deme: NonZeroU32 ) -> Self
§Contracts
Post-condition - debug: creates a habitat with a combined local and meta community size
ret.get_total_habitat() == old(OffByOneU64::from(local_area.0) * OffByOneU64::from(local_area.1) * OffByOneU64::from(local_deme) + OffByOneU64::from(meta_area.0) * OffByOneU64::from(meta_area.1) * OffByOneU64::from(meta_deme))
pub fn local(&self) -> &NonSpatialHabitat<M>
pub fn meta(&self) -> &NonSpatialHabitat<M>
Trait Implementations§
source§impl<M: MathsCore> Clone for SpatiallyImplicitHabitat<M>
impl<M: MathsCore> Clone for SpatiallyImplicitHabitat<M>
source§impl<M: Debug + MathsCore> Debug for SpatiallyImplicitHabitat<M>
impl<M: Debug + MathsCore> Debug for SpatiallyImplicitHabitat<M>
source§impl<M: MathsCore, G: RngCore<M>> DispersalSampler<M, SpatiallyImplicitHabitat<M>, G> for SpatiallyImplicitDispersalSampler<M, G>
impl<M: MathsCore, G: RngCore<M>> DispersalSampler<M, SpatiallyImplicitHabitat<M>, G> for SpatiallyImplicitDispersalSampler<M, G>
§fn sample_dispersal_from_location(
&self,
location: &Location,
habitat: &H,
rng: &mut G
) -> Location
fn sample_dispersal_from_location( &self, location: &Location, habitat: &H, rng: &mut G ) -> Location
Contracts Read more
source§impl<M: MathsCore> Habitat<M> for SpatiallyImplicitHabitat<M>
impl<M: MathsCore> Habitat<M> for SpatiallyImplicitHabitat<M>
type LocationIterator<'a> = impl Iterator<Item = Location> + 'a
fn is_finite(&self) -> bool
fn get_extent(&self) -> &LandscapeExtent
fn is_location_habitable(&self, location: &Location) -> bool
fn is_indexed_location_habitable( &self, indexed_location: &IndexedLocation ) -> bool
§fn get_total_habitat(&self) -> OffByOneU64
fn get_total_habitat(&self) -> OffByOneU64
Contracts Read more
§fn get_habitat_at_location(&self, location: &Location) -> u32
fn get_habitat_at_location(&self, location: &Location) -> u32
Contracts Read more
§fn map_indexed_location_to_u64_injective(
&self,
indexed_location: &IndexedLocation
) -> u64
fn map_indexed_location_to_u64_injective( &self, indexed_location: &IndexedLocation ) -> u64
Contracts Read more
fn iter_habitable_locations(&self) -> Self::LocationIterator<'_>
source§impl<M: MathsCore> RustToCuda for SpatiallyImplicitHabitat<M>
impl<M: MathsCore> RustToCuda for SpatiallyImplicitHabitat<M>
type CudaRepresentation = SpatiallyImplicitHabitatCudaRepresentation<M>
type CudaAllocation = CombinedCudaAlloc<<NonSpatialHabitat<M> as RustToCuda>::CudaAllocation, CombinedCudaAlloc<<NonSpatialHabitat<M> as RustToCuda>::CudaAllocation, NoCudaAlloc>>
source§impl<M: MathsCore> RustToCudaAsync for SpatiallyImplicitHabitat<M>
impl<M: MathsCore> RustToCudaAsync for SpatiallyImplicitHabitat<M>
source§impl<M: MathsCore, G: RngCore<M>> SeparableDispersalSampler<M, SpatiallyImplicitHabitat<M>, G> for SpatiallyImplicitDispersalSampler<M, G>
impl<M: MathsCore, G: RngCore<M>> SeparableDispersalSampler<M, SpatiallyImplicitHabitat<M>, G> for SpatiallyImplicitDispersalSampler<M, G>
§fn sample_non_self_dispersal_from_location(
&self,
location: &Location,
habitat: &H,
rng: &mut G
) -> Location
fn sample_non_self_dispersal_from_location( &self, location: &Location, habitat: &H, rng: &mut G ) -> Location
Contracts Read more
§fn get_self_dispersal_probability_at_location(
&self,
location: &Location,
habitat: &H
) -> ClosedUnitF64
fn get_self_dispersal_probability_at_location( &self, location: &Location, habitat: &H ) -> ClosedUnitF64
Contracts Read more
source§impl<M: MathsCore> SpeciationProbability<M, SpatiallyImplicitHabitat<M>> for SpatiallyImplicitSpeciationProbability
impl<M: MathsCore> SpeciationProbability<M, SpatiallyImplicitHabitat<M>> for SpatiallyImplicitSpeciationProbability
§fn get_speciation_probability_at_location(
&self,
location: &Location,
habitat: &H
) -> ClosedUnitF64
fn get_speciation_probability_at_location( &self, location: &Location, habitat: &H ) -> ClosedUnitF64
Contracts Read more
source§impl<M: MathsCore, G: RngCore<M>> UniformlySampleableHabitat<M, G> for SpatiallyImplicitHabitat<M>
impl<M: MathsCore, G: RngCore<M>> UniformlySampleableHabitat<M, G> for SpatiallyImplicitHabitat<M>
§fn sample_habitable_indexed_location(&self, rng: &mut G) -> IndexedLocation
fn sample_habitable_indexed_location(&self, rng: &mut G) -> IndexedLocation
Contracts Read more
Auto Trait Implementations§
impl<M> Freeze for SpatiallyImplicitHabitat<M>
impl<M> RefUnwindSafe for SpatiallyImplicitHabitat<M>where
M: RefUnwindSafe,
impl<M> Send for SpatiallyImplicitHabitat<M>
impl<M> Sync for SpatiallyImplicitHabitat<M>
impl<M> Unpin for SpatiallyImplicitHabitat<M>where
M: Unpin,
impl<M> UnwindSafe for SpatiallyImplicitHabitat<M>where
M: UnwindSafe,
Blanket Implementations§
§impl<T> Backup for Twhere
T: Clone,
impl<T> Backup for Twhere
T: Clone,
default unsafe fn backup_unchecked(&self) -> T
default unsafe fn __contracts_impl_backup_unchecked(&self) -> T
fn backup(&self) -> BackedUp<Self>
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 moresource§impl<T> LendToCuda for Twhere
T: RustToCuda,
impl<T> LendToCuda for Twhere
T: RustToCuda,
source§fn lend_to_cuda<O, E, F>(&self, inner: F) -> Result<O, E>where
E: From<CudaError>,
F: FnOnce(HostAndDeviceConstRef<'_, DeviceAccessible<<T as RustToCuda>::CudaRepresentation>>) -> Result<O, E>,
T: Sync,
fn lend_to_cuda<O, E, F>(&self, inner: F) -> Result<O, E>where
E: From<CudaError>,
F: FnOnce(HostAndDeviceConstRef<'_, DeviceAccessible<<T as RustToCuda>::CudaRepresentation>>) -> Result<O, E>,
T: Sync,
Lends an immutable borrow of
&self
to CUDA: Read moresource§fn lend_to_cuda_mut<O, E, F>(&mut self, inner: F) -> Result<O, E>where
E: From<CudaError>,
F: FnOnce(HostAndDeviceMutRef<'_, DeviceAccessible<<T as RustToCuda>::CudaRepresentation>>) -> Result<O, E>,
T: Sync + SafeMutableAliasing,
fn lend_to_cuda_mut<O, E, F>(&mut self, inner: F) -> Result<O, E>where
E: From<CudaError>,
F: FnOnce(HostAndDeviceMutRef<'_, DeviceAccessible<<T as RustToCuda>::CudaRepresentation>>) -> Result<O, E>,
T: Sync + SafeMutableAliasing,
source§fn move_to_cuda<O, E, F>(self, inner: F) -> Result<O, E>where
E: From<CudaError>,
F: FnOnce(HostAndDeviceOwned<'_, DeviceAccessible<<T as RustToCuda>::CudaRepresentation>>) -> Result<O, E>,
T: Send + RustToCuda,
<T as RustToCuda>::CudaRepresentation: StackOnly,
<T as RustToCuda>::CudaAllocation: EmptyCudaAlloc,
fn move_to_cuda<O, E, F>(self, inner: F) -> Result<O, E>where
E: From<CudaError>,
F: FnOnce(HostAndDeviceOwned<'_, DeviceAccessible<<T as RustToCuda>::CudaRepresentation>>) -> Result<O, E>,
T: Send + RustToCuda,
<T as RustToCuda>::CudaRepresentation: StackOnly,
<T as RustToCuda>::CudaAllocation: EmptyCudaAlloc,
source§impl<T> LendToCudaAsync for Twhere
T: RustToCudaAsync,
impl<T> LendToCudaAsync for Twhere
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,
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