|
|
@ -29,11 +29,12 @@ |
|
|
|
;; Wrap the opaque graph structure coming from the generic |
|
|
|
;; graph library. |
|
|
|
(struct graph (g)) |
|
|
|
(define gg graph-g) |
|
|
|
|
|
|
|
(define (has-vertex? g v) |
|
|
|
(g:has-vertex? (graph-g g) v)) |
|
|
|
(g:has-vertex? (gg g) v)) |
|
|
|
(define (has-edge? g u v) |
|
|
|
(g:has-edge? (graph-g g) u v)) |
|
|
|
(g:has-edge? (gg g) u v)) |
|
|
|
|
|
|
|
;; 2 Graph constructors |
|
|
|
;; 2.2 Weighted graphs |
|
|
@ -42,7 +43,7 @@ |
|
|
|
|
|
|
|
;; 10 Graphviz |
|
|
|
(define (graphviz g #:output [output #f] #:colors [colors #f]) |
|
|
|
(g:graphviz (graph-g g) #:output output #:colors colors))) |
|
|
|
(g:graphviz (gg g) #:output output #:colors colors))) |
|
|
|
|
|
|
|
|
|
|
|
(require/typed/provide 'graph-wrapper |
|
|
|