pub struct SignedCoefficientBuilder<ObType, MorType> { /* private fields */ }
Expand description
Builder for signed coefficient matrices and analyses based on them.
Used to construct the linear and Lotka-Volterra ODE analyses.
Implementations§
Source§impl SignedCoefficientBuilder<QualifiedName, QualifiedPath>
impl SignedCoefficientBuilder<QualifiedName, QualifiedPath>
Sourcepub fn linear_ode_analysis(
&self,
model: &DiscreteDblModel,
data: LinearODEProblemData,
) -> ODEAnalysis<LinearODESystem>
pub fn linear_ode_analysis( &self, model: &DiscreteDblModel, data: LinearODEProblemData, ) -> ODEAnalysis<LinearODESystem>
Linear ODE analysis for a model of a double theory.
This analysis is a special case of linear ODE analysis for extended causal loop diagrams but can serve as a simple/naive semantics for causal loop diagrams, hopefully useful for toy models and demonstration purposes.
Source§impl SignedCoefficientBuilder<QualifiedName, QualifiedPath>
impl SignedCoefficientBuilder<QualifiedName, QualifiedPath>
Sourcepub fn lotka_volterra_analysis(
&self,
model: &DiscreteDblModel,
data: LotkaVolterraProblemData,
) -> ODEAnalysis<LotkaVolterraSystem>
pub fn lotka_volterra_analysis( &self, model: &DiscreteDblModel, data: LotkaVolterraProblemData, ) -> ODEAnalysis<LotkaVolterraSystem>
Lotka-Volterra ODE analysis for a model of a double theory.
The main application we have in mind is the Lotka-Volterra ODE semantics for signed graphs described in our paper on regulatory networks.
Source§impl<ObType, MorType> SignedCoefficientBuilder<ObType, MorType>
impl<ObType, MorType> SignedCoefficientBuilder<ObType, MorType>
Sourcepub fn add_positive(self, mor_type: MorType) -> Self
pub fn add_positive(self, mor_type: MorType) -> Self
Adds a morphism type defining a positive interaction between objects.
Sourcepub fn add_negative(self, mor_type: MorType) -> Self
pub fn add_negative(self, mor_type: MorType) -> Self
Adds a morphism type defining a negative interaction between objects.
Sourcepub fn build_matrix<Id>(
&self,
model: &impl FgDblModel<ObType = ObType, MorType = MorType, Ob = Id, ObGen = Id, MorGen = Id>,
coeffs: &HashMap<Id, f32>,
) -> (DMatrix<f32>, BTreeMap<Id, usize>)
pub fn build_matrix<Id>( &self, model: &impl FgDblModel<ObType = ObType, MorType = MorType, Ob = Id, ObGen = Id, MorGen = Id>, coeffs: &HashMap<Id, f32>, ) -> (DMatrix<f32>, BTreeMap<Id, usize>)
Builds the matrix of coefficients for the given model.
Returns the coefficient matrix along with an ordered map from object generators to integer indices.
Auto Trait Implementations§
impl<ObType, MorType> Freeze for SignedCoefficientBuilder<ObType, MorType>where
ObType: Freeze,
impl<ObType, MorType> RefUnwindSafe for SignedCoefficientBuilder<ObType, MorType>where
ObType: RefUnwindSafe,
MorType: RefUnwindSafe,
impl<ObType, MorType> Send for SignedCoefficientBuilder<ObType, MorType>
impl<ObType, MorType> Sync for SignedCoefficientBuilder<ObType, MorType>
impl<ObType, MorType> Unpin for SignedCoefficientBuilder<ObType, MorType>
impl<ObType, MorType> UnwindSafe for SignedCoefficientBuilder<ObType, MorType>where
ObType: UnwindSafe,
MorType: 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
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>
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>
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§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.