Trait rustcoalescence_scenarios::Scenario
source · pub trait Scenario<M: MathsCore, G: RngCore<M>>: Sized + Send + ScenarioParameters {
type Habitat: Send + Clone + UniformlySampleableHabitat<M, G>;
type OriginSampler<'h, I: Iterator<Item = u64>>: TrustedOriginSampler<'h, M, Habitat = Self::Habitat>
where M: 'h,
G: 'h,
Self: 'h;
type OriginSamplerAuxiliary: Send + Clone;
type Decomposition: Decomposition<M, Self::Habitat>;
type DecompositionAuxiliary: Send + Clone;
type LineageStore<L: LineageStore<M, Self::Habitat>>: LineageStore<M, Self::Habitat>;
type DispersalSampler: Send + Clone + DispersalSampler<M, Self::Habitat, G>;
type TurnoverRate: Send + Clone + TurnoverRate<M, Self::Habitat>;
type SpeciationProbability: Send + Clone + SpeciationProbability<M, Self::Habitat>;
// Required methods
fn new(
args: Self::Arguments,
speciation_probability_per_generation: PositiveUnitF64
) -> Result<ScenarioCogs<M, G, Self>, Self::Error>;
fn sample_habitat<'h, I: Iterator<Item = u64>>(
habitat: &'h Self::Habitat,
pre_sampler: OriginPreSampler<M, I>,
auxiliary: Self::OriginSamplerAuxiliary
) -> Self::OriginSampler<'h, I>
where G: 'h;
fn decompose(
habitat: &Self::Habitat,
subdomain: Partition,
auxiliary: Self::DecompositionAuxiliary
) -> Self::Decomposition;
}
Required Associated Types§
type Habitat: Send + Clone + UniformlySampleableHabitat<M, G>
type OriginSampler<'h, I: Iterator<Item = u64>>: TrustedOriginSampler<'h, M, Habitat = Self::Habitat> where M: 'h, G: 'h, Self: 'h
type OriginSamplerAuxiliary: Send + Clone
type Decomposition: Decomposition<M, Self::Habitat>
type DecompositionAuxiliary: Send + Clone
type LineageStore<L: LineageStore<M, Self::Habitat>>: LineageStore<M, Self::Habitat>
type DispersalSampler: Send + Clone + DispersalSampler<M, Self::Habitat, G>
type TurnoverRate: Send + Clone + TurnoverRate<M, Self::Habitat>
type SpeciationProbability: Send + Clone + SpeciationProbability<M, Self::Habitat>
Required Methods§
sourcefn new(
args: Self::Arguments,
speciation_probability_per_generation: PositiveUnitF64
) -> Result<ScenarioCogs<M, G, Self>, Self::Error>
fn new( args: Self::Arguments, speciation_probability_per_generation: PositiveUnitF64 ) -> Result<ScenarioCogs<M, G, Self>, Self::Error>
§Errors
Returns a Self::Error
if creating the scenario failed
fn sample_habitat<'h, I: Iterator<Item = u64>>(
habitat: &'h Self::Habitat,
pre_sampler: OriginPreSampler<M, I>,
auxiliary: Self::OriginSamplerAuxiliary
) -> Self::OriginSampler<'h, I>where
G: 'h,
fn decompose( habitat: &Self::Habitat, subdomain: Partition, auxiliary: Self::DecompositionAuxiliary ) -> Self::Decomposition
Object Safety§
This trait is not object safe.