network: Add domains to network-form.
This commit is contained in:
parent
cfe710e6b2
commit
ed03015e81
1 changed files with 7 additions and 4 deletions
11
networks.rkt
11
networks.rkt
|
@ -20,7 +20,9 @@
|
|||
[struct dynamics ([network network?]
|
||||
[mode mode?])]
|
||||
[struct network ([functions (hash/c variable? procedure?)]
|
||||
[domains domain-mapping/c])])
|
||||
[domains domain-mapping/c])]
|
||||
[struct network-form ([forms variable-mapping?]
|
||||
[domains domain-mapping/c])])
|
||||
;; Functions
|
||||
(contract-out [update (-> network? state? (set/c variable? #:kind 'dont-care) state?)]
|
||||
[make-state (-> (listof (cons/c symbol? any/c)) state?)]
|
||||
|
@ -236,9 +238,10 @@
|
|||
;;; '(and x y (not z)) or '(+ 1 a (- b 10)).
|
||||
(define update-function-form? any/c)
|
||||
|
||||
;;; A Boolean network form is a mapping from its variables to the
|
||||
;;; forms of their update functions.
|
||||
(define network-form? variable-mapping?)
|
||||
;;; A network form consists of a mapping from variables to the forms
|
||||
;;; of their update functions, together with a mapping from its
|
||||
;;; variables to its update functions.
|
||||
(struct network-form (forms domains))
|
||||
|
||||
;;; Build an update function from an update function form.
|
||||
(define (update-function-form->update-function form)
|
||||
|
|
Loading…
Reference in a new issue