networks: Move apply-tbf-to-state to the top of the section.
This commit is contained in:
parent
3fa5b7ca89
commit
c27b9fe28b
1 changed files with 11 additions and 11 deletions
22
networks.rkt
22
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?))
|
||||
|
|
Loading…
Reference in a new issue