In [1]:
import DSGRN
In [2]:
network = DSGRN.Network("""
X1 : (X1+X2)(~X3)
X2 : (X1)
X3 : (X1)(~X2)""")
In [3]:
DSGRN.DrawGraph(network)
Out[3]:
In [4]:
parametergraph = DSGRN.ParameterGraph(network)
In [5]:
print("There are " + str(parametergraph.size()) + " nodes in the parameter graph.")
In [6]:
parameterindex = 34892 # An arbitrarily selected integer in [0,326592)
In [7]:
parameter = parametergraph.parameter(parameterindex)
In [8]:
print(parameter)
In [9]:
domaingraph = DSGRN.DomainGraph(parameter)
In [10]:
DSGRN.DrawGraph(domaingraph)
Out[10]:
In [11]:
print(domaingraph.coordinates(5)) # ... I wonder what region in phase space domain 5 corresponds to.
In [12]:
morsedecomposition = DSGRN.MorseDecomposition(domaingraph.digraph())
In [13]:
DSGRN.DrawGraph(morsedecomposition)
Out[13]:
In [14]:
morsegraph = DSGRN.MorseGraph(domaingraph, morsedecomposition)
In [15]:
DSGRN.DrawGraph(morsegraph)
Out[15]:
In [16]:
from DSGRN import *
pg = ParameterGraph(Network("X : ~Y\nY : ~X\n"))
In [17]:
Table(["Parameter Index", "Morse Graph"],
[ [ i, DrawGraph(MorseGraph(DomainGraph(pg.parameter(i))))] for i in range(0,pg.size())])
Out[17]:
We can sample real-valued parameter values from combinatorial parameter regions using the ParameterSampler
class. This class provides a method sample
which takes an integer parameter index and returns a string describing a randomly sampled instance within the associated parameter region.
In [18]:
sampler = DSGRN.ParameterSampler(parametergraph)
sampler.sample(parameterindex)
Out[18]:
In [ ]: