pub(crate) enum FnUpdateTemp {
Const(bool),
Var(String),
Param(String, Vec<String>),
Not(Box<FnUpdateTemp>),
Binary(BinaryOp, Box<FnUpdateTemp>, Box<FnUpdateTemp>),
}
Expand description
(internal) A helper enum for representing a parsed FnUpdate
that has not been
integrated into a BooleanNetwork
yet.
Variants
Const(bool)
Var(String)
Param(String, Vec<String>)
Not(Box<FnUpdateTemp>)
Binary(BinaryOp, Box<FnUpdateTemp>, Box<FnUpdateTemp>)
Implementations
sourceimpl FnUpdateTemp
impl FnUpdateTemp
sourcepub fn unknown_variables_to_parameters(
self,
rg: &RegulatoryGraph
) -> Box<FnUpdateTemp>
pub fn unknown_variables_to_parameters(
self,
rg: &RegulatoryGraph
) -> Box<FnUpdateTemp>
Replace all variables that are not valid in the given RegulatoryGraph
with
unary parameters.
sourcepub fn dump_parameters(&self, result: &mut HashSet<Parameter>)
pub fn dump_parameters(&self, result: &mut HashSet<Parameter>)
Write all parameters that appear in this function into a given set.
Note that if there are parameters with the same name but different cardinality, both will appear in the set because the instances are not equivalent.
sourcepub fn dump_variables(&self, result: &mut HashSet<String>)
pub fn dump_variables(&self, result: &mut HashSet<String>)
Write all variables that appear in the function to the given set.
sourcepub fn into_fn_update(
self,
bn: &BooleanNetwork
) -> Result<Box<FnUpdate>, String>
pub fn into_fn_update(
self,
bn: &BooleanNetwork
) -> Result<Box<FnUpdate>, String>
Safely build an actual update function using the information from the given BooleanNetwork
.
Fail if some variable or parameter is used inconsistently with the way they appear in the network.
sourcefn get_variable(bn: &BooleanNetwork, name: &str) -> Result<VariableId, String>
fn get_variable(bn: &BooleanNetwork, name: &str) -> Result<VariableId, String>
(internal) Utility method to safely obtain a variable id from a network with an appropriate error.
sourcefn get_parameter(bn: &BooleanNetwork, name: &str) -> Result<ParameterId, String>
fn get_parameter(bn: &BooleanNetwork, name: &str) -> Result<ParameterId, String>
(internal) Utility method to safely obtain a parameter id from a network with an appropriate error.
Trait Implementations
sourceimpl Clone for FnUpdateTemp
impl Clone for FnUpdateTemp
sourcefn clone(&self) -> FnUpdateTemp
fn clone(&self) -> FnUpdateTemp
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for FnUpdateTemp
impl Debug for FnUpdateTemp
sourceimpl Display for FnUpdateTemp
impl Display for FnUpdateTemp
sourceimpl Hash for FnUpdateTemp
impl Hash for FnUpdateTemp
sourceimpl PartialEq<FnUpdateTemp> for FnUpdateTemp
impl PartialEq<FnUpdateTemp> for FnUpdateTemp
sourcefn eq(&self, other: &FnUpdateTemp) -> bool
fn eq(&self, other: &FnUpdateTemp) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &FnUpdateTemp) -> bool
fn ne(&self, other: &FnUpdateTemp) -> bool
This method tests for !=
.
sourceimpl TryFrom<&'_ str> for FnUpdateTemp
impl TryFrom<&'_ str> for FnUpdateTemp
impl Eq for FnUpdateTemp
impl StructuralEq for FnUpdateTemp
impl StructuralPartialEq for FnUpdateTemp
Auto Trait Implementations
impl RefUnwindSafe for FnUpdateTemp
impl Send for FnUpdateTemp
impl Sync for FnUpdateTemp
impl Unpin for FnUpdateTemp
impl UnwindSafe for FnUpdateTemp
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more