diff --git a/networks-tests.rkt b/networks-tests.rkt index 068cba8..8e4645c 100644 --- a/networks-tests.rkt +++ b/networks-tests.rkt @@ -67,11 +67,6 @@ ((a . #f) (b . 1)) ((a . #f) (b . 2)) ((a . #f) (b . 3)))) - (check-equal? (map hash->list (build-all-states-same-domain '(a b) '(#t #f))) - '(((a . #t) (b . #t)) - ((a . #t) (b . #f)) - ((a . #f) (b . #t)) - ((a . #f) (b . #f)))) (check-equal? (hash->list (make-boolean-domains '(a b))) '((a . (#f #t)) (b . (#f #t)))) diff --git a/networks.rkt b/networks.rkt index 37e8a2b..0c12d86 100644 --- a/networks.rkt +++ b/networks.rkt @@ -24,7 +24,6 @@ [list-interactions (-> network-form? variable? (listof variable?))] [build-interaction-graph (-> network-form? graph?)] [build-all-states (-> domain-mapping/c (listof state?))] - [build-all-states-same-domain (-> (listof variable?) generic-set? (listof state?))] [make-same-domains (-> (listof variable?) generic-set? (hash/c variable? generic-set?))] [make-boolean-domains (-> (listof variable?) (hash/c variable? (list/c #f #t)))] [get-interaction-sign (-> network-form? domain-mapping/c variable? variable? (or/c '+ '- '0))] @@ -161,11 +160,6 @@ (make-state (for/list ([var vars] [val s]) (cons var val)))))) -;;; Given a list of variables and a domain common to all of them, -;;; builds the list of all possible states. -(define (build-all-states-same-domain vars domain) - (build-all-states (for/hash ([v vars]) (values v domain)))) - ;;; Makes a hash set mapping all variables to a single domain. (define (make-same-domains vars domain) (for/hash ([var vars]) (values var domain))) @@ -236,3 +230,7 @@ (list (match (get-interaction-sign network-form doms x y) ['+ 1] ['- -1] ['0 0]) x y)))))) + +;1. Define the contract/predicate for domain mapping +;1. Remove build-all-states-same-domain. +;2. Add a short test to example.org