# HG changeset patch # User Steve Losh # Date 1478476889 0 # Node ID 6da20bc6b4fd4ed3edc1b4c716b1c8c1e3455da9 # Parent e9e8c74601822ece0a5136c893458183597b3dc3 cl-digraph: Update site. diff -r e9e8c7460182 -r 6da20bc6b4fd cl-digraph/usage/index.html --- a/cl-digraph/usage/index.html Sun Nov 06 23:49:33 2016 +0000 +++ b/cl-digraph/usage/index.html Mon Nov 07 00:01:29 2016 +0000 @@ -34,6 +34,7 @@
  • Topological Sorting
  • +
  • Drawing
  • Package

    All core cl-digraph functions are in the digraph package. You can :use that @@ -337,6 +338,25 @@ (C B A D) (B C A D) + + +

    An error will be signaled if the digraph contains a cycle.

    +

    Drawing

    +

    If you have Graphviz installed, you can draw digraph objects to images with +the cl-dot library by loading the optional cl-digraph.dot system:

    +
    (ql:quickload 'cl-digraph.dot)
    +
    +(defparameter *d*
    +  (digraph:make-digraph :initial-vertices '(a b c d foo bar)))
    +
    +(loop :for (from to) :in '((a b) (a c) (b d) (foo bar) (bar bar))
    +      :do (digraph:insert-edge *d* from to))
    +
    +(digraph.dot:draw *d* :filename "digraph.png" :format :png)
    +
    + + +

    Digraph PNG