Add gg as a synonym for graph-g.

This commit is contained in:
Sergiu Ivanov 2021-01-01 21:52:26 +01:00
parent cec1ff51b6
commit 0001c87589

View file

@ -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