This project defines the basic functions for creating and displaying a data structure of the Graph type.
The transformation of the Graph into a format suitable for visualization is carried out using the Graphviz program.
(mnas-graph/view:view-graph
(mnas-graph:make-graph
'(("a" "b") ("a" "c") ("a" "d") ("b" "c") ("c" "d"))))(let*
((g (make-instance 'mnas-graph:<graph>))
(v1 (make-instance 'mnas-graph:<node> :owner g :name "v1"))
(v2 (make-instance 'mnas-graph:<node> :owner g :name "v2"))
(v3 (make-instance 'mnas-graph:<node> :owner g :name "v3"))
(r1 (make-instance 'mnas-graph:<edge> :tail v1 :head v2))
(r2 (make-instance 'mnas-graph:<edge> :tail v2 :head v3))
(r3 (make-instance 'mnas-graph:<edge> :tail v3 :head v1)))
(mnas-graph:insert-to v1 g)
(mnas-graph:insert-to v2 g)
(mnas-graph:insert-to v3 g)
(mnas-graph:insert-to r1 g)
(mnas-graph:insert-to r2 g)
(mnas-graph:insert-to r3 g)
(mnas-graph/view:view-graph g))(mnas-graph/demos:demo-6)