$Id: graphviz-support.lisp,v 1.7 2005/06/21 20:51:51 moody Exp $
-Copyright 1992 - 2005 Experimental Knowledge Systems Lab,
-University of Massachusetts Amherst MA, 01003-4610
-Professor Paul Cohen, Director
-
Author: Gary King, Levente Mészáros, Attila Lendvai
DISCUSSION
|#
(in-package metabang.graph)
-(export '(
- print-dot-key-value
- dot-attribute-value
- dot-attributes-mixin
- *dot-graph-attributes*
- ))
-
;;; ---------------------------------------------------------------------------
;
; This outputs the graph to string in accordance with the DOT file format.
; For more information about DOT file format, search the web for "DOTTY" and
; "GRAPHVIZ".
;
-(defmethod graph->dot ((g basic-graph) (stream stream)
+ graph->dot ((g basic-graph) (stream stream)
&key
(graph-formatter 'graph->dot-properties)
(vertex-key 'vertex-id)
(iterate-vertexes
g
(lambda (v)
+ ;(spy v)
(iterate-edges
v
(lambda (e)
+ ;(spy e (undirected-edge-p e) (item-at-1 edges e))
(when (and (undirected-edge-p e)
(not (item-at-1 edges e)))
(setf (item-at-1 edges e) t)
(defmethod (setf dot-attribute-value) :before (value (attr symbol) (thing dot-attributes-mixin))
+ (declare (ignore value))
(ensure-valid-dot-attribute attr thing))
(defmethod (setf dot-attribute-value) (value (attr symbol) (thing dot-attributes-mixin))