diff --git a/networks.rkt b/networks.rkt index 09038bd..c3c804d 100644 --- a/networks.rkt +++ b/networks.rkt @@ -36,6 +36,7 @@ Modality Mode dynamics% Dynamics% make-syn make-asyn make-asyn-dynamics make-syn-dynamics pretty-print-state pretty-print-boolean-state pretty-print-state-graph-with + pretty-print-state-graph ppsg ) (define-type (State a) (VariableMapping a)) @@ -681,6 +682,14 @@ (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)) + + (: pretty-print-state-graph (-> Graph Graph)) + (define (pretty-print-state-graph gr) + (define (pprinter/any [x : Any]) + (pretty-print-state (assert-type x (State Any)))) + (pretty-print-state-graph-with gr pprinter/any)) + + (define ppsg pretty-print-state-graph) ) (require 'typed) diff --git a/scribblings/networks.scrbl b/scribblings/networks.scrbl index 33ea3ff..138bd2c 100644 --- a/scribblings/networks.scrbl +++ b/scribblings/networks.scrbl @@ -494,6 +494,20 @@ pretty-printed with @racket[pprinter] and the edges with } +@defproc[(pretty-print-state-graph [gr Graph]) Graph]{ + +Calls @racket[pretty-print-state-graph-with] with @racket[pretty-print-state]. + +} + +@defproc[(ppsg [gr Graph]) Graph]{ + +A shortcut for @racket[pretty-print-state-graph]. + +} + + + @section{Inferring interaction graphs} This section provides inference of both unsigned and signed interaction graphs.