Struct biodivine_lib_param_bn::Regulation
source · pub struct Regulation {
pub regulator: VariableId,
pub target: VariableId,
pub observable: bool,
pub monotonicity: Option<Monotonicity>,
}
Expand description
Describes an interaction between two Variables
in a RegulatoryGraph
(or a BooleanNetwork
).
Every regulation can be monotonous, and can be set as observable:
- Monotonicity is either positive or negative and signifies that the influence of the
regulator
on thetarget
has to increase or decrease thetarget
value respectively. - If observability is set to
true
, theregulator
must have influence on the outcome of thetarget
update function in some context. If set to false, this is not enforced (i.e. theregulator
can have an influence on thetarget
, but it is not required).
Regulations can be represented as strings in the
form "regulator_name 'relationship' target_name"
. The ‘relationship’ starts with -
, which
is followed by >
for activation (positive monotonicity), |
for inhibition (negative
monotonicity) or ?
for unspecified monotonicity. Finally, an additional ?
at the end
of ‘relationship’ signifies a non-observable regulation. Together, this gives the
following options: ->, ->?, -|, -|?, -?, -??
.
Regulations cannot be created directly, they are only borrowed from a RegulatoryGraph
or a BooleanNetwork
.
Fields§
§regulator: VariableId
§target: VariableId
§observable: bool
§monotonicity: Option<Monotonicity>
Implementations§
source§impl Regulation
impl Regulation
Basic getters.
sourcepub fn is_observable(&self) -> bool
pub fn is_observable(&self) -> bool
Check if the regulation is marked as observable.
sourcepub fn get_monotonicity(&self) -> Option<Monotonicity>
pub fn get_monotonicity(&self) -> Option<Monotonicity>
Return monotonicity of the regulation (if specified).
sourcepub fn get_regulator(&self) -> VariableId
pub fn get_regulator(&self) -> VariableId
Get the VariableId
if the regulator.
sourcepub fn get_target(&self) -> VariableId
pub fn get_target(&self) -> VariableId
Get the VariableId
of the target.
source§impl Regulation
impl Regulation
Serialization utility methods.
sourcepub fn try_from_string(
regulation: &str
) -> Option<(String, Option<Monotonicity>, bool, String)>
pub fn try_from_string( regulation: &str ) -> Option<(String, Option<Monotonicity>, bool, String)>
Try to read all available information about a regulation from a given string in the standard format.
The returned data correspond to the items as they appear in the string, i.e. regulator
,
monotonicity
, observability
and target
. If the string is not valid, returns None
.
sourcepub fn to_string(&self, context: &RegulatoryGraph) -> String
pub fn to_string(&self, context: &RegulatoryGraph) -> String
Convert to standard string format using variable names provided by a RegulatoryGraph
.
Trait Implementations§
source§impl Clone for Regulation
impl Clone for Regulation
source§fn clone(&self) -> Regulation
fn clone(&self) -> Regulation
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for Regulation
impl Debug for Regulation
source§impl Hash for Regulation
impl Hash for Regulation
source§impl PartialEq for Regulation
impl PartialEq for Regulation
source§fn eq(&self, other: &Regulation) -> bool
fn eq(&self, other: &Regulation) -> bool
self
and other
values to be equal, and is used
by ==
.