networks: Add state/tbf-w and state/tbf-θ.

This commit is contained in:
Sergiu Ivanov 2020-07-23 00:05:34 +02:00
parent 1f33e6c38c
commit 3fa5b7ca89

View file

@ -79,6 +79,8 @@
[random-network (domain-mapping/c . -> . network?)]
[random-boolean-network ((listof variable?) . -> . network?)]
[random-boolean-network/vars (number? . -> . network?)]
[state/tbf-w (-> state/tbf? (hash/c variable? number?))]
[state/tbf-θ (-> state/tbf? number?)]
[apply-tbf-to-state (-> tbf? state? (or/c 0 1))])
;; Predicates
(contract-out [variable? (-> any/c boolean?)]
@ -931,6 +933,10 @@
;;; 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?))