diff --git a/example/dots/exampledpQygl.svg b/example/dots/exampledpQygl.svg index 13d7c8c..40ffc9c 100644 --- a/example/dots/exampledpQygl.svg +++ b/example/dots/exampledpQygl.svg @@ -4,11 +4,11 @@ - + G - + node0 @@ -19,7 +19,7 @@ node0->node0 -- +-1 @@ -32,7 +32,7 @@ node0->node1 -+ +1 @@ -45,14 +45,14 @@ node1->node2 -+ +1 node2->node1 -0 +-1 diff --git a/example/dots/examplehsuRqc.svg b/example/dots/examplehsuRqc.svg index a602fe1..f87adba 100644 --- a/example/dots/examplehsuRqc.svg +++ b/example/dots/examplehsuRqc.svg @@ -12,27 +12,14 @@ node0 - -a:1 b:1 + +a:0 b:1 node0->node0 - -{b} - - - -node2 - -a:0 b:1 - - - -node0->node2 - - -{a} + +{b}{a} @@ -46,11 +33,24 @@ {b}{a} + + +node2 + +a:1 b:1 + + + +node2->node0 + + +{a} + node2->node2 - -{b}{a} + +{b} diff --git a/example/example.org b/example/example.org index 5a4915a..bb722a7 100644 --- a/example/example.org +++ b/example/example.org @@ -434,19 +434,19 @@ tab not to 2. Here's the unsigned syntactic interaction graph of this network: - #+NAME: simple-bn-ig + #+NAME: simple-bn-syig #+BEGIN_SRC racket :results silent :var simple-bn=munch-sexp(simple-bn) (dotit (build-syntactic-interaction-graph (unorgv simple-bn))) #+END_SRC #+BEGIN_SRC dot :file dots/examplejTo8XT.svg :results raw drawer :cmd sfdp :noweb yes -<> +<> #+END_SRC #+RESULTS: - :RESULTS: + :results: [[file:dots/examplejTo8XT.svg]] - :END: + :end: Note that, while this definition is an easy one to check structurally, this is *not* how interaction graphs are typically @@ -457,11 +457,36 @@ tab syntactic interaction graph does not in fact agree with this criterion, the simplest example being the network y = x \wedge \neg x. + Here is the unsigned interaction graph of the same network, this + time constructed according to the canonical definition: + #+NAME: simple-bn-ig + #+BEGIN_SRC racket :results silent :var simple-bn=munch-sexp(simple-bn) +(dotit (build-interaction-graph/form (unorgv simple-bn) (make-boolean-domains '(a b c)))) + #+END_SRC + + #+BEGIN_SRC dot :file dots/example1FH1rZ.svg :results raw drawer :cmd sfdp :noweb yes +<> + #+END_SRC + + #+RESULTS: + :results: + [[file:dots/example1FH1rZ.svg]] + :end: + + In this particular case, the syntactic interaction graph is the + same as the interaction graph constructed according to the + conventional definition. This however may not necessarily be the + case for all networks. + + The function =build-interaction-graph/form= builds the interaction + graph from the syntactic definition of the network. For an already + built network, you can use =build-interaction-graph=. + Here's the signed interaction graph of this network: #+NAME: simple-bn-sig #+BEGIN_SRC racket :results silent :var simple-bn=munch-sexp(simple-bn) -(dotit (build-boolean-signed-interaction-graph/form (unorgv simple-bn))) +(dotit (build-signed-interaction-graph/form (unorgv simple-bn) (make-boolean-domains '(a b c)))) #+END_SRC #+BEGIN_SRC dot :file dots/exampledpQygl.svg :results raw drawer :cmd sfdp :noweb yes @@ -469,14 +494,9 @@ tab #+END_SRC #+RESULTS: - :RESULTS: + :results: [[file:dots/exampledpQygl.svg]] - :END: - - For the interaction a \to b, note indeed that when c is #f, b is - always #f (positive interaction). On the other hand, when c is #t, - b becomes (not a) (negative interaction). Therefore, the influence - of a on b is neither activating nor inhibiting. + :end: Here is the full state graph of this network under the asynchronous dynamics: @@ -558,9 +578,9 @@ tab #+END_SRC #+RESULTS: - :RESULTS: + :results: [[file:dots/examplei4we6j.svg]] - :END: + :end: For some networks, a single transition between two states may be due to different modalities. Consider the following network: @@ -580,9 +600,9 @@ tab #+END_SRC #+RESULTS: - :RESULTS: + :results: [[file:dots/examplehsuRqc.svg]] - :END: + :end: ** Tabulating functions and networks Here's how you can tabulate a function. The domain of x is {1, 2},