# HG changeset patch # User Steve Losh # Date 1575419552 18000 # Node ID e805f586a549bf08bd6991f899da19b44b1ed156 # Parent 697d200ad3494d37aa223491d475b6b84d2fd718 cl-digraph: Update site. diff -r 697d200ad349 -r e805f586a549 cl-digraph/_dmedia/goodwolf.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cl-digraph/_dmedia/goodwolf.css Tue Dec 03 19:32:32 2019 -0500 @@ -0,0 +1,62 @@ +/* @override http://localhost:8080/media/css/pygments-monokai-light.css */ +div.highlight .hll { background-color: #FFD7EF; display: block; } +div.highlight .err { color: #fff; background-color: #f00 } /* Error */ +div.highlight .gi { font-weight: bold } /* Diff Insert */ +div.highlight .gd { font-weight: bold } /* Diff Delete */ +div.highlight .k { color: #111} /* Keyword */ +div.highlight .l { color: #111 } /* Literal */ +div.highlight .n { color: #111 } /* Name */ +div.highlight .o { color: #111 } /* Operator */ +div.highlight .p { color: #111 } /* Punctuation */ +div.highlight .c { color: #714678; font-style: italic; font-weight: bold; } /* Comment */ +div.highlight .cm { color: #714678; font-style: italic; font-weight: bold; } /* Comment.Multiline */ +div.highlight .cp { color: #714678; font-style: italic; font-weight: bold; } /* Comment.Preproc */ +div.highlight .c1 { color: #714678; font-style: italic; font-weight: bold; } /* Comment.Single */ +div.highlight .cs { color: #714678; font-style: italic; font-weight: bold; } /* Comment.Special */ +div.highlight .ge { font-style: italic } /* Generic.Emph */ +div.highlight .gs { font-weight: bold } /* Generic.Strong */ +div.highlight .kc { color: #111 } /* Keyword.Constant */ +div.highlight .kd { color: #111 } /* Keyword.Declaration */ +div.highlight .kn { color: #111 } /* Keyword.Namespace */ +div.highlight .kp { color: #111 } /* Keyword.Pseudo */ +div.highlight .kr { color: #111 } /* Keyword.Reserved */ +div.highlight .kt { color: #111 } /* Keyword.Type */ +div.highlight .ld { color: #111 } /* Literal.Date */ +div.highlight .m { color: #111 } /* Literal.Number */ +div.highlight .s { color: #111; font-style: italic; } /* Literal.String */ +div.highlight .na { color: #111 } /* Name.Attribute */ +div.highlight .nb { color: #111 } /* Name.Builtin */ +div.highlight .nc { color: #111 } /* Name.Class */ +div.highlight .no { color: #111 } /* Name.Constant */ +div.highlight .nd { color: #111 } /* Name.Decorator */ +div.highlight .ni { color: #111 } /* Name.Entity */ +div.highlight .ne { color: #111 } /* Name.Exception */ +div.highlight .nf { color: #111} /* Name.Function */ +div.highlight .nl { color: #111 } /* Name.Label */ +div.highlight .nn { color: #111} /* Name.Namespace */ +div.highlight .nx { color: #111 } /* Name.Other */ +div.highlight .py { color: #111 } /* Name.Property */ +div.highlight .nt { color: #111 } /* Name.Tag */ +div.highlight .nv { color: #111 } /* Name.Variable */ +div.highlight .ow { color: #111 } /* Operator.Word */ +div.highlight .w { color: #111 } /* Text.Whitespace */ +div.highlight .mf { color: #111 } /* Literal.Number.Float */ +div.highlight .mh { color: #111 } /* Literal.Number.Hex */ +div.highlight .mi { color: #111 } /* Literal.Number.Integer */ +div.highlight .mo { color: #111 } /* Literal.Number.Oct */ +div.highlight .sb { color: #111 } /* Literal.String.Backtick */ +div.highlight .sc { color: #111 } /* Literal.String.Char */ +div.highlight .sd { color: #111 } /* Literal.String.Doc */ +div.highlight .s2 { color: #111 } /* Literal.String.Double */ +div.highlight .se { color: #111 } /* Literal.String.Escape */ +div.highlight .sh { color: #111 } /* Literal.String.Heredoc */ +div.highlight .si { color: #111 } /* Literal.String.Interpol */ +div.highlight .sx { color: #111 } /* Literal.String.Other */ +div.highlight .sr { color: #111 } /* Literal.String.Regex */ +div.highlight .s1 { color: #111 } /* Literal.String.Single */ +div.highlight .ss { color: #111 } /* Literal.String.Symbol */ +div.highlight .bp { color: #111 } /* Name.Builtin.Pseudo */ +div.highlight .vc { color: #111 } /* Name.Variable.Class */ +div.highlight .vg { color: #111 } /* Name.Variable.Global */ +div.highlight .vi { color: #111 } /* Name.Variable.Instance */ +div.highlight .il { color: #111 } /* Literal.Number.Integer.Long */ diff -r 697d200ad349 -r e805f586a549 cl-digraph/_dmedia/style.less --- a/cl-digraph/_dmedia/style.less Sun Nov 17 18:28:54 2019 -0500 +++ b/cl-digraph/_dmedia/style.less Tue Dec 03 19:32:32 2019 -0500 @@ -2,11 +2,11 @@ overflow-y: scroll; } .wrap { - width: 600px; + width: 640px; margin: 40px auto 180px; } body { - font-size: 18px; + font-size: 16px; line-height: 1.4; font-family: Georgia, Palatino, "Palatino Linotype", serif; color: #111111; @@ -27,11 +27,11 @@ } } h1 { - font-size: 48px; + font-size: 40px; line-height: 1; } h2 { - font-size: 34px; + font-size: 28px; line-height: 1; margin-top: 40px; margin-bottom: 0; @@ -44,7 +44,7 @@ } } h3 { - font-size: 26px; + font-size: 22px; line-height: 1; margin-top: 40px; margin-bottom: 0; @@ -57,7 +57,7 @@ } } h4 { - font-size: 20px; + font-size: 18px; line-height: 1; margin-top: 30px; margin-bottom: 0; @@ -83,7 +83,7 @@ } } pre { - font-size: 15px; + font-size: 14px; line-height: 1.3; white-space: pre; overflow-x: auto; @@ -93,7 +93,7 @@ font-family: Menlo, Monaco, Consolas, monospace; } code { - font-size: 15px; + font-size: 14px; border: 1px solid #fdd; background: #fffafa; padding: 1px 4px; diff -r 697d200ad349 -r e805f586a549 cl-digraph/_dmedia/tango.css --- a/cl-digraph/_dmedia/tango.css Sun Nov 17 18:28:54 2019 -0500 +++ b/cl-digraph/_dmedia/tango.css Tue Dec 03 19:32:32 2019 -0500 @@ -1,6 +1,6 @@ .codehilite .hll { background-color: #ffffcc } .codehilite .c { color: #8f5902; font-style: italic } /* Comment */ -.codehilite .err { color: #a40000; border: 1px solid #ef2929 } /* Error */ +.codehilite .err { color: #000000; } /* Error */ .codehilite .g { color: #000000 } /* Generic */ .codehilite .k { color: #204a87; font-weight: bold } /* Keyword */ .codehilite .l { color: #000000 } /* Literal */ @@ -61,7 +61,7 @@ .codehilite .sx { color: #4e9a06 } /* Literal.String.Other */ .codehilite .sr { color: #4e9a06 } /* Literal.String.Regex */ .codehilite .s1 { color: #4e9a06 } /* Literal.String.Single */ -.codehilite .ss { color: #4e9a06 } /* Literal.String.Symbol */ +.codehilite .ss { color: #000000 } /* Literal.String.Symbol */ .codehilite .bp { color: #3465a4 } /* Name.Builtin.Pseudo */ .codehilite .vc { color: #000000 } /* Name.Variable.Class */ .codehilite .vg { color: #000000 } /* Name.Variable.Global */ diff -r 697d200ad349 -r e805f586a549 cl-digraph/changelog/index.html --- a/cl-digraph/changelog/index.html Sun Nov 17 18:28:54 2019 -0500 +++ b/cl-digraph/changelog/index.html Tue Dec 03 19:32:32 2019 -0500 @@ -15,11 +15,15 @@

Changelog

Here's the list of changes in each released version.

+

v1.3.0

+

Added the arbitrary-vertex function to return an arbitrary vertex of +a digraph.

v1.2.1

Fixed a bug in copy-digraph.

v1.2.0

diff -r 697d200ad349 -r e805f586a549 cl-digraph/reference-dot/index.html --- a/cl-digraph/reference-dot/index.html Sun Nov 17 18:28:54 2019 -0500 +++ b/cl-digraph/reference-dot/index.html Tue Dec 03 19:32:32 2019 -0500 @@ -23,7 +23,7 @@

Package DIGRAPH.DOT

DRAW (function)

-
(DRAW DIGRAPH &KEY (FILENAME digraph.png) (FORMAT :PNG))
+
(DRAW DIGRAPH &KEY (FILENAME digraph.png) (FORMAT :PNG))
 
diff -r 697d200ad349 -r e805f586a549 cl-digraph/reference/index.html --- a/cl-digraph/reference/index.html Sun Nov 17 18:28:54 2019 -0500 +++ b/cl-digraph/reference/index.html Tue Dec 03 19:32:32 2019 -0500 @@ -20,6 +20,7 @@

Package DIGRAPH

+

ARBITRARY-VERTEX (function)

+
(ARBITRARY-VERTEX DIGRAPH)
+
+ + +

Return an arbitrary vertex of digraph and t.

+

If the digraph is empty, (values nil nil) will be returned instead.

CONTAINS-EDGE-P (function)

(CONTAINS-EDGE-P DIGRAPH PREDECESSOR SUCCESSOR)
 
@@ -154,7 +162,7 @@

This is currently O(vertices).

A root is a vertex with no outgoing edges (i.e. out-degree 0).

MAKE-DIGRAPH (function)

-
(MAKE-DIGRAPH &KEY INITIAL-VERTICES (TEST #'EQL) (HASH-FUNCTION NIL))
+
(MAKE-DIGRAPH &KEY INITIAL-VERTICES (TEST #'EQL) (HASH-FUNCTION NIL))
 
@@ -255,7 +263,7 @@

Return a fresh list of the predecessors of vertex.

REACHABLEP (function)

-
(REACHABLEP DIGRAPH START TARGET &KEY (STRATEGY :BREADTH-FIRST))
+
(REACHABLEP DIGRAPH START TARGET &KEY (STRATEGY :BREADTH-FIRST))
 
diff -r 697d200ad349 -r e805f586a549 cl-digraph/usage/index.html --- a/cl-digraph/usage/index.html Sun Nov 17 18:28:54 2019 -0500 +++ b/cl-digraph/usage/index.html Tue Dec 03 19:32:32 2019 -0500 @@ -43,8 +43,8 @@

Creating Digraphs

Digraphs can be created with make-digraph:

(digraph:make-digraph)
-; =>
-#<DIGRAPH:DIGRAPH () {1002CFD343}>
+; =>
+#<DIGRAPH:DIGRAPH () {1002CFD343}>
 
@@ -54,15 +54,15 @@
(defparameter *d* (digraph:make-digraph))
 
 (digraph:vertices *d*)
-; =&gt; ()
+; => ()
 
 (digraph:insert-vertex *d* 'foo)
 (digraph:vertices *d*)
-; =&gt; (foo)
+; => (foo)
 
 (digraph:insert-vertex *d* 'bar)
 (digraph:vertices *d*)
-; =&gt; (bar foo)
+; => (bar foo)
 
@@ -75,7 +75,7 @@ (digraph:insert-vertex *d* 'foo) (digraph:insert-vertex *d* 'foo) (digraph:vertices *d*) -; =&gt; (foo) +; => (foo)
@@ -85,11 +85,11 @@ (digraph:make-digraph :initial-vertices '(a b c))) (digraph:vertices *d*) -; =&gt; (a c b) +; => (a c b) (digraph:insert-vertex *d* 'foo) (digraph:vertices *d*) -; =&gt; (a c foo b) +; => (a c foo b)
@@ -99,15 +99,15 @@ (digraph:make-digraph :initial-vertices '(a b c))) (digraph:vertices *d*) -; =&gt; (a c b) +; => (a c b) (digraph:remove-vertex *d* 'a) (digraph:vertices *d*) -; =&gt; (c b) +; => (c b) (digraph:remove-vertex *d* 'cats) (digraph:vertices *d*) -; =&gt; (c b) +; => (c b)
@@ -121,15 +121,15 @@ (digraph:insert-vertex *d* (list 1 2)) (digraph:insert-vertex *d* (list 3 4)) (digraph:vertices *d*) -; =&gt; ((1 2) (3 4)) +; => ((1 2) (3 4)) (digraph:insert-vertex *d* (list 1 2)) (digraph:vertices *d*) -; =&gt; ((1 2) (3 4)) +; => ((1 2) (3 4)) (digraph:remove-vertex *d* (list 1 2)) (digraph:vertices *d*) -; =&gt; ((3 4)) +; => ((3 4)) @@ -161,15 +161,15 @@ (digraph:make-digraph :initial-vertices '(a b c))) (digraph:edges *d*) -; =&gt; () +; => () -(digraph:insert-edge *d* 'a 'b) ; a -&gt; b +(digraph:insert-edge *d* 'a 'b) ; a -> b (digraph:edges *d*) -; =&gt; ((a . b)) +; => ((a . b)) -(digraph:insert-edge *d* 'b 'c) ; b -&gt; c +(digraph:insert-edge *d* 'b 'c) ; b -> c (digraph:edges *d*) -; =&gt; ((b . c) (a . b)) +; => ((b . c) (a . b)) @@ -178,14 +178,14 @@
(defparameter *d*
   (digraph:make-digraph :initial-vertices '(a b c)))
 
-(digraph:insert-edge *d* 'a 'b) ; a -&gt; b
+(digraph:insert-edge *d* 'a 'b) ; a -> b
 (digraph:insert-edge *d* 'a 'b) ; ignored
 (digraph:insert-edge *d* 'a 'b) ; ignored
 (digraph:edges *d*)
-; =&gt; ((a . b))
+; => ((a . b))
 
 (digraph:insert-edge *d* 'cats 'dogs)
-; =&gt; Error!
+; => Error!
 
@@ -194,14 +194,14 @@
(defparameter *d*
   (digraph:make-digraph :initial-vertices '(a b c)))
 
-(digraph:insert-edge *d* 'a 'b) ; a -&gt; b
+(digraph:insert-edge *d* 'a 'b) ; a -> b
 (digraph:edges *d*)
-; =&gt; ((a . b))
+; => ((a . b))
 
-(digraph:remove-edge *d* 'a 'b) ; removes a -&gt; b
+(digraph:remove-edge *d* 'a 'b) ; removes a -> b
 (digraph:remove-edge *d* 'a 'b) ; ignored
 (digraph:edges *d*)
-; =&gt; ()
+; => ()
 
@@ -231,10 +231,10 @@

Vertices and Edges

We've already seen vertices and edges:

(digraph:vertices *d*)
-; =&gt; (BAR FOO D C B A)
+; => (BAR FOO D C B A)
 
 (digraph:edges *d*)
-; =&gt; ((BAR . BAR) (FOO . BAR) (B . D) (A . B) (A . C))
+; => ((BAR . BAR) (FOO . BAR) (B . D) (A . B) (A . C))
 
@@ -243,49 +243,49 @@

Neighboring Vertices

The predecessors and successors functions return a list of vertices with edges to/from a particular vertex:

-
(digraph:predecessors *d* 'a) ; =&gt; ()
-(digraph:successors *d* 'a)   ; =&gt; (b c)
+
(digraph:predecessors *d* 'a) ; => ()
+(digraph:successors *d* 'a)   ; => (b c)
 
-(digraph:predecessors *d* 'bar) ; =&gt; (foo bar)
-(digraph:successors *d*   'bar) ; =&gt; (bar)
+(digraph:predecessors *d* 'bar) ; => (foo bar)
+(digraph:successors *d*   'bar) ; => (bar)
 

neighbors returns all vertices that are a predecessor or successor of the given vertex:

-
(digraph:neighbors *d* 'b) ; =&gt; (a d)
+
(digraph:neighbors *d* 'b) ; => (a d)
 

Membership

To check whether a digraph contains a particular edge or vertex use contains-vertex-p and contains-edge-p:

-
(digraph:contains-vertex-p *d* 'a)      ; =&gt; t
-(digraph:contains-vertex-p *d* 'horses) ; =&gt; nil
+
(digraph:contains-vertex-p *d* 'a)      ; => t
+(digraph:contains-vertex-p *d* 'horses) ; => nil
 
-(digraph:contains-edge-p *d* 'a 'b)     ; =&gt; t
-(digraph:contains-edge-p *d* 'a 'foo)   ; =&gt; nil
+(digraph:contains-edge-p *d* 'a 'b)     ; => t
+(digraph:contains-edge-p *d* 'a 'foo)   ; => nil
 

Sizes and Counts

If you just want the number of vertices or edges in a digraph and don't need a list of them, use count-vertices and count-edges:

-
(digraph:count-vertices *d*) ; =&gt; 6
-(digraph:count-edges *d*)    ; =&gt; 5
+
(digraph:count-vertices *d*) ; => 6
+(digraph:count-edges *d*)    ; => 5
 

Similarly, if you want to know the number of edges into/out of/involving a vertex use degree, degree-in, and degree-out:

-
(digraph:predecessors *d* 'a) ; =&gt; ()
+
(digraph:predecessors *d* 'a) ; => ()
 (digraph:degree-in    *d* 'a) ; = 0
 
-(digraph:successors *d* 'bar) ; =&gt; (bar)
-(digraph:degree-out *d* 'bar) ; =&gt; 1
+(digraph:successors *d* 'bar) ; => (bar)
+(digraph:degree-out *d* 'bar) ; => 1
 
-(digraph:neighbors  *d* 'b) ; =&gt; (a d)
-(digraph:degree-out *d* 'b) ; =&gt; 2
+(digraph:neighbors  *d* 'b) ; => (a d)
+(digraph:degree-out *d* 'b) ; => 2
 
@@ -334,7 +334,7 @@ (digraph:insert-edge *d* 'd 'a) ; d depends on a (digraph:topological-sort *d*) -; =&gt; one of +; => one of (C B A D) (B C A D)