networks: list-interactions → list-syntactic-interactions.
This commit is contained in:
parent
681ed0e732
commit
5ece1f6c88
1 changed files with 6 additions and 6 deletions
12
networks.rkt
12
networks.rkt
|
@ -29,7 +29,7 @@
|
|||
[network-form->network (-> network-form? network?)]
|
||||
[make-network-from-forms (-> (listof (cons/c symbol? update-function-form?))
|
||||
network?)]
|
||||
[list-interactions (-> network-form? variable? (listof variable?))]
|
||||
[list-syntactic-interactions (-> network-form? variable? (listof variable?))]
|
||||
[build-syntactic-interaction-graph (-> network-form? graph?)]
|
||||
[build-all-states (-> domain-mapping/c (listof state?))]
|
||||
[make-same-domains (-> (listof variable?) generic-set? domain-mapping/c)]
|
||||
|
@ -294,17 +294,17 @@
|
|||
|
||||
;;; Lists the variables of the network form appearing in the update
|
||||
;;; function form for x.
|
||||
(define (list-interactions nf x)
|
||||
(define (list-syntactic-interactions nf x)
|
||||
(set-intersect
|
||||
(extract-symbols (hash-ref nf x))
|
||||
(hash-keys nf)))
|
||||
|
||||
(module+ test
|
||||
(test-case "list-interactions"
|
||||
(test-case "list-syntactic-interactions"
|
||||
(define n #hash((a . (+ a b c))
|
||||
(b . (- b c))))
|
||||
(check-true (set=? (list-interactions n 'a) '(a b)))
|
||||
(check-true (set=? (list-interactions n 'b) '(b)))))
|
||||
(check-true (set=? (list-syntactic-interactions n 'a) '(a b)))
|
||||
(check-true (set=? (list-syntactic-interactions n 'b) '(b)))))
|
||||
|
||||
;;; Builds the graph in which the vertices are the variables of a
|
||||
;;; given network, and which contains an arrow from a to b whenever a
|
||||
|
@ -322,7 +322,7 @@
|
|||
(define (build-syntactic-interaction-graph n)
|
||||
(transpose
|
||||
(unweighted-graph/adj
|
||||
(for/list ([(var _) n]) (cons var (list-interactions n var))))))
|
||||
(for/list ([(var _) n]) (cons var (list-syntactic-interactions n var))))))
|
||||
|
||||
(module+ test
|
||||
(test-case "build-syntactic-interaction-graph"
|
||||
|
|
Loading…
Reference in a new issue