From b3d2ed94ec23c0c813604c912780b387026f44ca Mon Sep 17 00:00:00 2001 From: Sergiu Ivanov Date: Sun, 18 Oct 2020 22:57:08 +0200 Subject: [PATCH] networks: Add build-full-01-state-graph and build-full-01-state-graph-annotated. --- networks.rkt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/networks.rkt b/networks.rkt index 111e350..ab54b9a 100644 --- a/networks.rkt +++ b/networks.rkt @@ -63,6 +63,8 @@ [ppsgb (-> graph? graph?)] [build-full-boolean-state-graph (-> dynamics? graph?)] [build-full-boolean-state-graph-annotated (-> dynamics? graph?)] + [build-full-01-state-graph (-> dynamics? graph?)] + [build-full-01-state-graph-annotated (-> dynamics? graph?)] [tabulate-state (->* (procedure? domain-mapping/c) (#:headers boolean?) (listof (listof any/c)))] [tabulate-state* (->* ((non-empty-listof procedure?) domain-mapping/c) (#:headers boolean?) @@ -760,6 +762,20 @@ #hash((a . #f) (b . #t)) #hash((a . #t) (b . #t))) (set (set 'a))))) +;;; Like build-full-boolean-state-graph, but the states are expressed +;;; in 0 and 1, instead of #f and #t. +(define (build-full-01-state-graph dyn) + (dds-build-state-graph + dyn + (list->set (build-all-01-states (hash-keys (dynamics-network dyn)))))) + +;;; Like build-full-boolean-state-graph-annotated, but the states are expressed +;;; in 0 and 1, instead of #f and #t. +(define (build-full-01-state-graph-annotated dyn) + (dds-build-state-graph-annotated + dyn + (list->set (build-all-01-states (hash-keys (dynamics-network dyn)))))) + ;;; ================================= ;;; Tabulating functions and networks