Type pretty-print-state-graph-with.
This commit is contained in:
parent
b1cc242c7b
commit
d5382eacda
2 changed files with 16 additions and 1 deletions
|
@ -35,7 +35,7 @@
|
|||
|
||||
Modality Mode dynamics% Dynamics% make-syn make-asyn
|
||||
make-asyn-dynamics make-syn-dynamics pretty-print-state
|
||||
pretty-print-boolean-state
|
||||
pretty-print-boolean-state pretty-print-state-graph-with
|
||||
)
|
||||
|
||||
(define-type (State a) (VariableMapping a))
|
||||
|
@ -675,6 +675,12 @@
|
|||
(check-equal?
|
||||
(pretty-print-boolean-state (hash 'a #f 'b #t 'c #t))
|
||||
"a:0 b:1 c:1")))
|
||||
|
||||
(: pretty-print-state-graph-with (-> Graph (-> Any Any) Graph))
|
||||
(define (pretty-print-state-graph-with gr pprinter)
|
||||
(define (e-pprinter/any [x : Any])
|
||||
(pretty-print-set-sets (assert-type x (Setof (Setof Any)))))
|
||||
(update-graph gr #:v-func pprinter #:e-func e-pprinter/any))
|
||||
)
|
||||
|
||||
(require 'typed)
|
||||
|
|
|
@ -485,6 +485,15 @@ all other values with 1.
|
|||
|
||||
}
|
||||
|
||||
@defproc[(pretty-print-state-graph-with [gr Graph] [pprinter (-> Any Any)]) Graph]{
|
||||
|
||||
Given a state graph @racket[gr] and the pretty-printer for states
|
||||
@racket[pprinter], build a new state graph in which the nodes are
|
||||
pretty-printed with @racket[pprinter] and the edges with
|
||||
@racket[pretty-print-set-sets].
|
||||
|
||||
}
|
||||
|
||||
@section{Inferring interaction graphs}
|
||||
|
||||
This section provides inference of both unsigned and signed interaction graphs.
|
||||
|
|
Loading…
Reference in a new issue