pub enum InteractionMatrixRecipe {
RandomUniform {
minimum: f64,
maximum: f64,
rng: RngConfig,
},
RandomGaussian {
mean: f64,
standard_deviation: f64,
rng: RngConfig,
},
CorrelatedGaussian {
mean: f64,
standard_deviation: f64,
reciprocal_correlation: f64,
connectance: f64,
diagonal: DiagonalPolicy,
normalization: MatrixNormalization,
rng: RngConfig,
},
SignStructuredGaussian {
structure: SignStructure,
scale: f64,
connectance: f64,
diagonal: DiagonalPolicy,
normalization: MatrixNormalization,
rng: RngConfig,
},
}Expand description
Reproducible scientific instructions for an ecological matrix realization.
Variants§
RandomUniform
Independently sample every matrix entry from a uniform distribution.
RandomGaussian
Independently sample every matrix entry from a Gaussian distribution.
Gaussian reciprocal pairs with Pearson correlation in [-1,1].
SignStructuredGaussian
Pairwise signs constrained to a common ecological relationship class.
Implementations§
Source§impl InteractionMatrixRecipe
impl InteractionMatrixRecipe
pub fn validate(&self, species: usize) -> Result<(), InteractionRecipeError>
pub fn generate( &self, species: usize, ) -> Result<InteractionMatrix, InteractionRecipeError>
pub const fn rng(&self) -> RngConfig
Trait Implementations§
Source§impl Clone for InteractionMatrixRecipe
impl Clone for InteractionMatrixRecipe
Source§fn clone(&self) -> InteractionMatrixRecipe
fn clone(&self) -> InteractionMatrixRecipe
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 InteractionMatrixRecipe
impl Debug for InteractionMatrixRecipe
Source§impl<'de> Deserialize<'de> for InteractionMatrixRecipe
impl<'de> Deserialize<'de> for InteractionMatrixRecipe
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for InteractionMatrixRecipe
impl PartialEq for InteractionMatrixRecipe
Source§impl Serialize for InteractionMatrixRecipe
impl Serialize for InteractionMatrixRecipe
impl StructuralPartialEq for InteractionMatrixRecipe
Auto Trait Implementations§
impl Freeze for InteractionMatrixRecipe
impl RefUnwindSafe for InteractionMatrixRecipe
impl Send for InteractionMatrixRecipe
impl Sync for InteractionMatrixRecipe
impl Unpin for InteractionMatrixRecipe
impl UnsafeUnpin for InteractionMatrixRecipe
impl UnwindSafe for InteractionMatrixRecipe
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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