generic: Make fallback-dds-build-state-graph-edges collect duplicate edges.
This commit is contained in:
parent
b2f686cdaa
commit
1fa342c2ad
2 changed files with 10 additions and 10 deletions
|
@ -5,7 +5,7 @@
|
|||
;;; Provides the definition of several generic interfaces for discrete
|
||||
;;; dynamical systems.
|
||||
|
||||
(require racket/generic graph)
|
||||
(require racket/generic graph "utils.rkt")
|
||||
|
||||
(provide
|
||||
;; Generics
|
||||
|
@ -41,7 +41,7 @@
|
|||
[labels empty]
|
||||
[current-states states]
|
||||
[visited-states states]
|
||||
#:result (values edges labels))
|
||||
#:result (collect-by-key edges labels))
|
||||
([i step-range]
|
||||
#:break (set-empty? current-states))
|
||||
(for/fold ([new-edges empty]
|
||||
|
|
|
@ -185,25 +185,25 @@
|
|||
(#hash((a . #f) (b . #t)) #hash((a . #t) (b . #t)))))
|
||||
(check-equal? (edge-weight gr-complete-bool-ann
|
||||
#hash((a . #f) (b . #f)) #hash((a . #t) (b . #f)))
|
||||
(set 'a))
|
||||
(list (set 'a)))
|
||||
(check-equal? (edge-weight gr-complete-bool-ann
|
||||
#hash((a . #f) (b . #f)) #hash((a . #f) (b . #f)))
|
||||
(set 'b))
|
||||
(list (set 'b)))
|
||||
(check-equal? (edge-weight gr-complete-bool-ann
|
||||
#hash((a . #t) (b . #f)) #hash((a . #t) (b . #f)))
|
||||
(set 'b))
|
||||
(list (set 'b)))
|
||||
(check-equal? (edge-weight gr-complete-bool-ann
|
||||
#hash((a . #t) (b . #f)) #hash((a . #f) (b . #f)))
|
||||
(set 'a))
|
||||
(list (set 'a)))
|
||||
(check-equal? (edge-weight gr-complete-bool-ann
|
||||
#hash((a . #t) (b . #t)) #hash((a . #f) (b . #t)))
|
||||
(set 'a))
|
||||
(list (set 'a)))
|
||||
(check-equal? (edge-weight gr-complete-bool-ann
|
||||
#hash((a . #t) (b . #t)) #hash((a . #t) (b . #t)))
|
||||
(set 'b))
|
||||
(list (set 'b)))
|
||||
(check-equal? (edge-weight gr-complete-bool-ann
|
||||
#hash((a . #f) (b . #t)) #hash((a . #f) (b . #t)))
|
||||
(set 'b))
|
||||
(list (set 'b)))
|
||||
(check-equal? (edge-weight gr-complete-bool-ann
|
||||
#hash((a . #f) (b . #t)) #hash((a . #t) (b . #t)))
|
||||
(set 'a))))
|
||||
(list (set 'a)))))
|
||||
|
|
Loading…
Reference in a new issue