miniBN#

class colomoto.minibn.BaseNetwork(data=None, Symbol_class=<class 'boolean.boolean.Symbol'>, allowed_in_name=('.', '_', ':', '-'), **kwargs)[source]#

Bases: dict

classmethod auto_cast(obj)[source]#
biolqm_format = None#
copy() a shallow copy of D[source]#
import_data(data)[source]#
classmethod load(filename, **kwargs)[source]#
rename(a, b)[source]#
rewrite(a, tr, simplify=True)[source]#
sanitize_names()[source]#
source(sep)[source]#
to_biolqm()[source]#
v(name)[source]#
vars(*names)[source]#
zero()[source]#
class colomoto.minibn.BlockParallelDynamics(spec, model, **opts)[source]#

Bases: BlockSequentialDynamics

class colomoto.minibn.BlockSequentialDynamics(sequence, model, loops=True)[source]#

Bases: PeriodicDynamics

class colomoto.minibn.BooleanNetwork(data=None, Symbol_class=<class 'boolean.boolean.Symbol'>, allowed_in_name=('.', '_', ':', '-'), **kwargs)[source]#

Bases: BaseNetwork

as_dnf()[source]#
biolqm_format = 'bnet'#
constants()[source]#
dynamics(update_mode='asynchronous', init=None, loops=None)[source]#

Returns a directed graph (networkx.DiGraph object) of the dynamics with the update_mode.

Parameters:
  • update_mode – either “asynchronous” (or equivalently “fully-asynchronous”), “synchronous” (or equivalently “parallel”), “general”. Alternatively, it can be a function returning an UpdateModeDynamics object.

  • init (dict[str,int]) – Optional initial state from which the dynamics is computed.

import_data(data)[source]#
influence_graph()[source]#
inputs()[source]#
make_hash(simplify=False)[source]#

compute a hash for the BN based on its DNF representation

propagate_constants()[source]#
For each node having a constant function, replace references to that

node by the constant in the expression of all the other nodes.

Performs simple function simplification. Modifies the Boolean network in-place. The set of constant nodes can be accessed with the constants() method.

simplify(in_place=False, suspect_dnf=True)[source]#

if in_place, modifies the network in place, otherwise works on a copy returns it. if suspect_dnf, try harder simplifications for functions that are in DNF and have literals with opposite signs in clauses (will make CNF and DNF transformations).

source(sep=', ')[source]#
to_pint()[source]#
to_pyboolnet()[source]#
class colomoto.minibn.ElementaryUpdateModeDynamics(model, min_u, max_u, **opts)[source]#

Bases: UpdateModeDynamics

class colomoto.minibn.FAsyncRun(model, init, k, seed=None)[source]#

Bases: _RandomRun

Fully-asynchronous update run

Run at most k steps of an execution of given model from initial configuration init.

Stops at fixpoints.

select_for_update(nodes)[source]#

Return the sub-sequence of nodes to actually update

class colomoto.minibn.FullyAsynchronousDynamics(model, **opts)[source]#

Bases: ElementaryUpdateModeDynamics

class colomoto.minibn.GAsyncRun(model, init, k, seed=None)[source]#

Bases: _RandomRun

(General) asynchronous update run

Run at most k steps of an execution of given model from initial configuration init.

Stops at fixpoints.

select_for_update(nodes)[source]#

Return the sub-sequence of nodes to actually update

class colomoto.minibn.GeneralAsynchronousDynamics(model, **opts)[source]#

Bases: ElementaryUpdateModeDynamics

class colomoto.minibn.MVVar(obj)[source]#

Bases: Symbol

is_instanciated()[source]#
level()[source]#
nodevar()[source]#
class colomoto.minibn.MultiValuedNetwork(*args, **kwargs)[source]#

Bases: BaseNetwork

append(a, f)[source]#
biolqm_format = 'mnet'#
import_data(data)[source]#
influence_graph()[source]#
rewrite(a, tr)[source]#
simplify()[source]#
source(sep=' <- ')[source]#
class colomoto.minibn.NOT(*args)[source]#

Bases: NOT

colomoto.minibn.ParallelDynamics#

alias of SynchronousDynamics

class colomoto.minibn.PeriodicDynamics(sequence, model, loops=True)[source]#

Bases: UpdateModeDynamics

Periodic (deterministic) updating mode.

It is parameterized by a sequence of sets of nodes to update simultaneously in order to compute the next configuration.

class colomoto.minibn.SequentialDynamics(sequence, model, **opts)[source]#

Bases: BlockSequentialDynamics

class colomoto.minibn.SyncRun(model, init, k)[source]#

Bases: _Run

Synchronous update run

Run at most k steps of an execution of given model from initial configuration init.

Stops at fixpoints.

select_for_update(nodes)[source]#

Return the sub-sequence of nodes to actually update

class colomoto.minibn.SynchronousDynamics(model, loops=True, **opts)[source]#

Bases: ElementaryUpdateModeDynamics

class colomoto.minibn.UpdateModeDynamics(model, loops=False)[source]#

Bases: object

Abstract class for the updating mode of a BooleanNetwork object

dynamics()[source]#
partial_dynamics(init)[source]#
push(d, x)[source]#
random_walk(init, steps=0, stop_condition=None, stop_at=None)[source]#
colomoto.minibn.is_constant(f)[source]#
colomoto.minibn.simplify_dnf(ba, f)[source]#
colomoto.minibn.struct_of_dnf(ba, f, container=<class 'frozenset'>, sort=False)[source]#