From 1f33e6c38c58afc80c6c4eefa1af127dac85d3e7 Mon Sep 17 00:00:00 2001 From: Sergiu Ivanov Date: Thu, 23 Jul 2020 00:02:35 +0200 Subject: [PATCH] networks: Add state/tbf. --- networks.rkt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/networks.rkt b/networks.rkt index e3508cc..b6dbd55 100644 --- a/networks.rkt +++ b/networks.rkt @@ -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?))