Revert "BREAKING: Make domains part of the network."
This reverts commit f414ae8966
.
This commit is contained in:
parent
f414ae8966
commit
5fd1e5cb5b
1 changed files with 4 additions and 7 deletions
11
networks.rkt
11
networks.rkt
|
@ -14,12 +14,10 @@
|
||||||
graph racket/random racket/hash)
|
graph racket/random racket/hash)
|
||||||
|
|
||||||
(provide
|
(provide
|
||||||
(struct-out dynamics)
|
|
||||||
;; Structures
|
;; Structures
|
||||||
|
(struct-out dynamics)
|
||||||
(contract-out [struct tbf/state ([weights (hash/c variable? number?)]
|
(contract-out [struct tbf/state ([weights (hash/c variable? number?)]
|
||||||
[threshold number?])]
|
[threshold number?])])
|
||||||
[struct network ([functions (hash/c variable? procedure?)]
|
|
||||||
[domains domain-mapping/c])])
|
|
||||||
;; Functions
|
;; Functions
|
||||||
(contract-out [update (-> network? state? (set/c variable? #:kind 'dont-care) state?)]
|
(contract-out [update (-> network? state? (set/c variable? #:kind 'dont-care) state?)]
|
||||||
[make-state (-> (listof (cons/c symbol? any/c)) state?)]
|
[make-state (-> (listof (cons/c symbol? any/c)) state?)]
|
||||||
|
@ -168,9 +166,8 @@
|
||||||
;;; state.
|
;;; state.
|
||||||
(define update-function/c (-> state? any/c))
|
(define update-function/c (-> state? any/c))
|
||||||
|
|
||||||
;;; A network is a mapping from its variables to its update functions,
|
;;; A network is a mapping from its variables to its update functions.
|
||||||
;;; together with the domains of the variables.
|
(define network? (hash/c variable? procedure?))
|
||||||
(struct network (functions domains))
|
|
||||||
|
|
||||||
;;; Given a state s updates all the variables from xs. This
|
;;; Given a state s updates all the variables from xs. This
|
||||||
;;; corresponds to a parallel mode.
|
;;; corresponds to a parallel mode.
|
||||||
|
|
Loading…
Reference in a new issue