diff --git a/networks.rkt b/networks.rkt index d0b7814..c1ae92a 100644 --- a/networks.rkt +++ b/networks.rkt @@ -929,17 +929,6 @@ ;;; TBF/TBN and SBF/SBN ;;; =================== -;;; A state TBF is a TBF with named inputs. A state TBF can be -;;; 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?)) - ;;; Applies a TBF to a state. ;;; ;;; The values of the variables of the state are ordered by hash-map @@ -952,3 +941,14 @@ (define st (make-state '((x1 . 0) (x2 . 1)))) (define f (tbf #(1 1) 1)) (check-equal? (apply-tbf-to-state f st) 0)) + +;;; A state TBF is a TBF with named inputs. A state TBF can be +;;; 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?))