From 5907edfef08c913c9b69156c77f2646c9f317bfd Mon Sep 17 00:00:00 2001 From: Sergiu Ivanov Date: Sun, 23 Feb 2020 12:23:55 +0100 Subject: [PATCH] dds-step -> dds-step-one --- generic.rkt | 4 ++-- networks-tests.rkt | 4 ++-- networks.rkt | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/generic.rkt b/generic.rkt index 4ae6572..ccfb928 100644 --- a/generic.rkt +++ b/generic.rkt @@ -11,11 +11,11 @@ ;; Generics gen:dds ;; Functions - (contract-out [dds-step (-> dds? any/c (set/c any/c))]) + (contract-out [dds-step-one (-> dds? any/c (set/c any/c))]) ;; Predicates (contract-out [dds? (-> any/c boolean?)])) ;;; A discrete dynamical system. (define-generics dds ;; Given a dds and a state, produce the next states of the dds. - (dds-step dds state)) + (dds-step-one dds state)) diff --git a/networks-tests.rkt b/networks-tests.rkt index 781cfe9..cb1bc72 100644 --- a/networks-tests.rkt +++ b/networks-tests.rkt @@ -112,6 +112,6 @@ [asyn (make-asyn-dynamics n)] [syn (make-syn-dynamics n)] [s (st '((a . #t) (b . #f)))]) - (check-equal? (dds-step asyn s) (set (st '((a . #f) (b . #f))) + (check-equal? (dds-step-one asyn s) (set (st '((a . #f) (b . #f))) (st '((a . #t) (b . #f))))) - (check-equal? (dds-step syn s) (set (st '((a . #f) (b . #f))))))) + (check-equal? (dds-step-one syn s) (set (st '((a . #f) (b . #f))))))) diff --git a/networks.rkt b/networks.rkt index dcdb454..964c133 100644 --- a/networks.rkt +++ b/networks.rkt @@ -36,7 +36,7 @@ [make-dynamics-from-func (-> network? (-> (listof variable?) mode?) dynamics?)] [make-asyn-dynamics (-> network? dynamics?)] [make-syn-dynamics (-> network? dynamics?)] - [dds-step (-> dynamics? state? (set/c state?))] + [dds-step-one (-> dynamics? state? (set/c state?))] ) ;; Predicates (contract-out [variable? (-> any/c boolean?)] @@ -262,7 +262,7 @@ ;;; A network dynamics is a network plus a mode. (struct dynamics (network mode) #:methods gen:dds - [(define/match (dds-step dyn s) + [(define/match (dds-step-one dyn s) [((dynamics network mode) s) (for/set ([m mode]) (update network s m))])])