From 5efe086d06de531d4b17284879513e150d6a41ea Mon Sep 17 00:00:00 2001 From: Sergiu Ivanov Date: Wed, 27 Apr 2022 00:15:03 +0200 Subject: [PATCH] Add UpdateFunction and DomainMapping. --- networks.rkt | 4 +++- scribblings/networks.scrbl | 14 ++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/networks.rkt b/networks.rkt index 41893ff..217c110 100644 --- a/networks.rkt +++ b/networks.rkt @@ -5,9 +5,11 @@ typed/graph racket/random) (provide - State) + State UpdateFunction DomainMapping) (define-type (State a) (VariableMapping a)) + (define-type (UpdateFunction a) (-> (State a) a)) + (define-type (DomainMapping a) (VariableMapping (Listof a))) ) (require 'typed) diff --git a/scribblings/networks.scrbl b/scribblings/networks.scrbl index 5910cfb..ac98c4f 100644 --- a/scribblings/networks.scrbl +++ b/scribblings/networks.scrbl @@ -34,6 +34,20 @@ the variables. A synonym of @racket[VariableMapping]. } +@defform[(UpdateFunction a)]{ + +An update function is a function computing a value from the given +state. This is a synonym of the type @racket[(-> (State a) a)]. + +} + +@defform[(DomainMapping a)]{ + +A domain mapping is a hash table mapping variables to the lists of values in +their domains. + +} + @section{Syntactic description of networks} @section{Inferring interaction graphs}