Struct biodivine_lib_param_bn::async_graph::AsyncGraph
source · [−]pub struct AsyncGraph<P: AsyncGraphEdgeParams> {
edges: P,
}
Expand description
An asynchronous transition system of a BooleanNetwork
. The states of the graph
are standard IdState
s. The parameter sets are given by the associated AsyncGraphEdgeParams
.
Async graph implements the standard “asynchronous update”, i.e. every variable can be
non-deterministically updated at any time, but the actual parameters for which this
happens are determined by the AsyncGraphEdgeParams
.
This actually hides a lot of complexity, because implementing AsyncGraphEdgeParams
is typically
much easier than re-implementing the whole async graph structure.
AsyncGraph
in its current form and the related structures are deprecated in favour of
SymbolicAsyncGraph
. We may re-implement it later under a new name and a new API, because
in some niche use cases it seems to be faster than fully symbolic approach. However,
try not to rely on this implementation too much.
Fields
edges: P
Implementations
sourceimpl AsyncGraph<DefaultEdgeParams>
impl AsyncGraph<DefaultEdgeParams>
sourcepub fn new(
network: BooleanNetwork
) -> Result<AsyncGraph<DefaultEdgeParams>, String>
pub fn new(
network: BooleanNetwork
) -> Result<AsyncGraph<DefaultEdgeParams>, String>
Create a new AsyncGraph
from the given BooleanNetwork
using default edge parameter implementation.
sourceimpl<Params: AsyncGraphEdgeParams> AsyncGraph<Params>
impl<Params: AsyncGraphEdgeParams> AsyncGraph<Params>
sourcepub fn new_with_edges(edge_params: Params) -> Result<AsyncGraph<Params>, String>
pub fn new_with_edges(edge_params: Params) -> Result<AsyncGraph<Params>, String>
Create a new AsyncGraph
using given edge parametrisation.
sourcepub fn num_states(&self) -> usize
pub fn num_states(&self) -> usize
Return the total number of states in this graph.
sourcepub fn network(&self) -> &BooleanNetwork
pub fn network(&self) -> &BooleanNetwork
Return a reference to the original Boolean network.
sourcepub fn make_witness(&self, params: &Params::ParamSet) -> BooleanNetwork
pub fn make_witness(&self, params: &Params::ParamSet) -> BooleanNetwork
Make a witness network for one parametrisation in the given set.
sourcepub fn empty_params(&self) -> &Params::ParamSet
pub fn empty_params(&self) -> &Params::ParamSet
Return an empty set of parameters.
sourcepub fn unit_params(&self) -> &Params::ParamSet
pub fn unit_params(&self) -> &Params::ParamSet
Return a full set of parameters.
Trait Implementations
sourceimpl<'a, Edges: AsyncGraphEdgeParams> Graph for &'a AsyncGraph<Edges>
impl<'a, Edges: AsyncGraphEdgeParams> Graph for &'a AsyncGraph<Edges>
sourceimpl<'a, Edges: AsyncGraphEdgeParams> InvertibleGraph for &'a AsyncGraph<Edges>
impl<'a, Edges: AsyncGraphEdgeParams> InvertibleGraph for &'a AsyncGraph<Edges>
Auto Trait Implementations
impl<P> RefUnwindSafe for AsyncGraph<P> where
P: RefUnwindSafe,
impl<P> Send for AsyncGraph<P> where
P: Send,
impl<P> Sync for AsyncGraph<P> where
P: Sync,
impl<P> Unpin for AsyncGraph<P> where
P: Unpin,
impl<P> UnwindSafe for AsyncGraph<P> where
P: UnwindSafe,
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