network,Dynamics: Fixes.

This commit is contained in:
Sergiu Ivanov 2020-11-22 21:35:19 +01:00
parent 6cfa66694d
commit fd651ba4cc
1 changed files with 3 additions and 3 deletions

View File

@ -676,7 +676,7 @@
;;; Given a network, applies a function for building a mode to its
;;; variables and returns the corresponding network dynamics.
(define (make-dynamics-from-func network mode-func)
(dynamics network (mode-func (hash-keys network))))
(dynamics network (mode-func (hash-keys (network-functions network)))))
;;; Creates the asynchronous dynamics for a given network.
(define (make-asyn-dynamics network)
@ -688,7 +688,7 @@
(module+ test
(test-case "make-asyn-dynamics, make-syn-dynamics"
(define n (network-form->network #hash((a . (not a)) (b . b))))
(define n (forms->boolean-network #hash((a . (not a)) (b . b))))
(define asyn (make-asyn-dynamics n))
(define syn (make-syn-dynamics n))
(check-equal? (dynamics-network asyn) n)
@ -748,7 +748,7 @@
(module+ test
(test-case "Dynamics of networks"
(define n (network-form->network #hash((a . (not a)) (b . b))))
(define n (forms->boolean-network #hash((a . (not a)) (b . b))))
(define asyn (make-asyn-dynamics n))
(define syn (make-syn-dynamics n))
(define s (make-state '((a . #t) (b . #f))))