mnas-graph

2023-06-18

System mnas-graph defines basic functions for creating a graph data structure and displaying it via graphviz.

Upstream URL

github.com/mnasoft/mnas-graph

Author

Mykola Matvyeyev <mnasoft@gmail.com>

License

GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 or later
README
Mnas-Graph

1Purpose

This project defines the basic functions for creating and displaying adata structure of the Graph type.

The transformation of the Graph into a format suitable for visualization is carried out using the Graphviz program.

2Examples

2.1Example 1

  (mnas-graph/view:view-graph
    (mnas-graph:make-graph
     '(("a" "b") ("a" "c") ("a" "d") ("b" "c") ("c" "d"))))

2.2Example 2

  (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))

2.3Example 3

  (mnas-graph/demos:demo-6)

Dependencies (5)

  • codex
  • fiveam
  • mnas-hash-table
  • mnas-package
  • mnas-string

Dependents (1)

  • GitHub
  • Quicklisp