diff --git a/networks.rkt b/networks.rkt index b6dbd55..d0b7814 100644 --- a/networks.rkt +++ b/networks.rkt @@ -79,6 +79,8 @@ [random-network (domain-mapping/c . -> . network?)] [random-boolean-network ((listof variable?) . -> . network?)] [random-boolean-network/vars (number? . -> . network?)] + [state/tbf-w (-> state/tbf? (hash/c variable? number?))] + [state/tbf-θ (-> state/tbf? number?)] [apply-tbf-to-state (-> tbf? state? (or/c 0 1))]) ;; Predicates (contract-out [variable? (-> any/c boolean?)] @@ -931,6 +933,10 @@ ;;; applied to states in an unambiguous ways. (struct state/tbf (weights threshold)) +;;; Shortcuts for acessing fields of a state/tbf. +(define state/tbf-w state/tbf-weights) +(define state/tbf-θ state/tbf-threshold) + ;;; A TBN is a network form mapping TBFs to variables. (define tbn? (hash/c variable? tbf?))