diff --git a/networks.rkt b/networks.rkt index 32f8a30..93db941 100644 --- a/networks.rkt +++ b/networks.rkt @@ -14,12 +14,10 @@ graph racket/random racket/hash) (provide - (struct-out dynamics) ;; Structures + (struct-out dynamics) (contract-out [struct tbf/state ([weights (hash/c variable? number?)] - [threshold number?])] - [struct network ([functions (hash/c variable? procedure?)] - [domains domain-mapping/c])]) + [threshold number?])]) ;; Functions (contract-out [update (-> network? state? (set/c variable? #:kind 'dont-care) state?)] [make-state (-> (listof (cons/c symbol? any/c)) state?)] @@ -168,9 +166,8 @@ ;;; state. (define update-function/c (-> state? any/c)) -;;; A network is a mapping from its variables to its update functions, -;;; together with the domains of the variables. -(struct network (functions domains)) +;;; A network is a mapping from its variables to its update functions. +(define network? (hash/c variable? procedure?)) ;;; Given a state s updates all the variables from xs. This ;;; corresponds to a parallel mode.