diff --git a/networks.rkt b/networks.rkt index 8139303..4080eab 100644 --- a/networks.rkt +++ b/networks.rkt @@ -955,5 +955,12 @@ ;;; weights, as well as a threshold. (define (make-tbf/state pairs threshold) (tbf/state (make-immutable-hash pairs) threshold)) + +(module+ test + (test-case "tbf/state" + (define f (make-tbf/state '((x1 . 1) (x2 . 1)) 1)) + (check-equal? (tbf/state-w f) #hash((x1 . 1) (x2 . 1))) + (check-equal? (tbf/state-θ f) 1))) + ;;; A TBN is a network form mapping TBFs to variables. (define tbn? (hash/c variable? tbf?))