pub struct Regulation {
    pub(crate) regulator: VariableId,
    pub(crate) target: VariableId,
    pub(crate) observable: bool,
    pub(crate) 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 the target has to increase or decrease the target value respectively.
  • If observability is set to true, the regulator must have influence on the outcome of the target update function in some context. If set to false, this is not enforced (i.e. the regulator can have an influence on the target, 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: VariableIdtarget: VariableIdobservable: boolmonotonicity: Option<Monotonicity>

Implementations

Basic getters.

Check if the regulation is marked as observable.

Return monotonicity of the regulation (if specified).

Get the VariableId if the regulator.

Get the VariableId of the target.

Serialization utility methods.

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.

Convert to standard string format using variable names provided by a RegulatoryGraph.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.