networks: Add state/tbf.

This commit is contained in:
Sergiu Ivanov 2020-07-23 00:02:35 +02:00
parent 7710e56bb8
commit 1f33e6c38c

View File

@ -15,6 +15,8 @@
(provide
;; Structures
(struct-out dynamics)
(contract-out [struct state/tbf ([weights (hash/c variable? number?)]
[threshold number?])])
;; Functions
(contract-out [update (-> network? state? (set/c variable? #:kind 'dont-care) state?)]
[make-state (-> (listof (cons/c symbol? any/c)) state?)]
@ -925,6 +927,10 @@
;;; 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))
;;; A TBN is a network form mapping TBFs to variables.
(define tbn? (hash/c variable? tbf?))