Index: release/4/digraph/trunk/digrapheggdoc.scm
===================================================================
 release/4/digraph/trunk/digrapheggdoc.scm (revision 20018)
+++ (revision )
@@ 1,187 +1,0 @@


(requirelibrary eggdoc)
(import eggdoc)

(define doc
 `((eggdoc:begin
 (name "digraph")
 (description "Directed graph in adjacency list format.")
 (author (url "http://chicken.wiki.br/users/ivanraikov" "Ivan Raikov"))

 (history
 (version "1.11" "Ported to Chicken 4")
 (version "1.10" "Now using matchable extension")
 (version "1.9" "Added procedures predlist and succlist")
 (version "1.8" "Added procedure nodeinfoset!")
 (version "1.7" "Build script updated for better crossplatform compatibility")
 (version "1.6" "Test infrastructure changed to use testbase")
 (version "1.5" "Bug fixes in setoutedges! and setinedges! [thanks to Andreas Scholta]")
 (version "1.4" "License upgrade to GPL v3")
 (version "1.3" "Updated the roots procedure to match the documentation")
 (version "1.2" "Minor changes to the setup script")
 (version "1.1" "Added support for chickensetup test")
 (version "1.0" "Initial release"))

 (requires (url "dynvector.html" "dynvector")
 (url "syntaxcase.html" "syntaxcase")
 (url "matchable.html" "matchable"))

 (usage "(requireextension digraph)")

 (download "digraph.egg")

 (documentation

 (p "The digraph library is an implementation of a directed "
 "graph, where the edges are stored as adjacency lists "
 "indexed by node number.")

 (p "The library defines a digraph \"object\"  a procedure that "
 "takes a method name as a symbol, and returns the procedure that "
 "implements the respective operation.")

 (subsection "Directed graph procedures"

 (p "The digraph object is created by procedure " (tt "makedigraph")
 ", which is the only uservisible procedure defined in this egg: ")

 (procedure "makedigraph:: NAME INFO [NODELIST [SUCCLIST [PREDLIST]]] > SELECTOR"
 (p "where " (tt "NAME") " is the graph name (string or symbol), "
 (tt "INFO") " is an optional metadata object of an arbitrary type "
 "or " (tt "#f") "; " (tt ("NODELIST"))
 " is an optional list of nodes to be inserted in the graph; "
 "each element of the list must be of the form " (tt "(N INFO)")
 " where " (tt "N") " is a unique node number (integer), and " (tt "INFO")
 " is an optional metadata object describing the node. "
 "Similarly, " (tt "SUCCLIST") " and " (tt "PREDLIST") " can be used "
 " to define the graph edges upon graph creation. If supplied, these arguments "
 "must be lists in which every element is of the form "
 (tt "(I J INFO)") ", where " (tt "I") " and " (tt "J") " are node numbers, "
 "and " (tt "INFO") " is an optional metadata object."))

 (p "The returned selector procedure can take one of the following arguments: "
 (symboltable
 (describe "'name" "returns the graph name (string or symbol)")
 (describe "'info" "returns the graph metadata (arbitrary type)")
 (describe "'newid!" ("returns a procedure with no arguments, "
 "which returns the lowest available node number"))
 (describe "'addnode!" ("returns a procedure " (tt "LAMBDA N INFO")
 " which inserts in the graph node with number " (tt "N")
 " and metadata " (tt "INFO") "; if the node already "
 "exists in the graph, it will be overwritten with the "
 "new metadata"))
 (describe "'addedge!" ("returns a procedure " (tt "LAMBDA EDGE")
 " which inserts in the graph the specifed edge; "
 "the edge is given by a list of the form "
 (tt "(I J INFO)") ", where " (tt "I") " and " (tt "J")
 " are source and destination nodes, respectively, and "
 (tt "INFO") " is edge metadata of arbitrary type"))
 (describe "'removenode!" ("returns a procedure " (tt "LAMBDA N")
 " which removes node " (tt "N")
 " and all its edges from the graph"))
 (describe "'nodes" ("returns a procedure with no arguments, "
 "which returns a list with the nodes of the graph "
 "and their metadata"))
 (describe "'edges" ("returns a procedure with no arguments, "
 "which returns a list with the edges of the graph "
 "and their metadata"))
 (describe "'roots" ("returns a procedure with no arguments, "
 "which returns a list with all nodes in the graph "
 "that do not have an predecessor"))
 (describe "'order" ("returns a procedure with no arguments, "
 "which returns the number of nodes in the graph"))
 (describe "'size" ("returns a procedure with no arguments, "
 "which returns the number of edges in the graph"))
 (describe "'capacity" ("returns a procedure with no arguments, "
 "which returns the size of the underlying dynamic vector"))

 (describe "'succ" ("returns a procedure " (tt "LAMBDA N")
 " which returns a list with the successor nodes of node " (tt "N")))
 (describe "'pred" ("returns a procedure " (tt "LAMBDA N")
 " which returns a list with the predecessor nodes of node " (tt "N")))
 (describe "'succlist" ("returns a procedure with no arguments "
 " which returns a list containing the successor nodes for each node."))
 (describe "'predlist" ("returns a procedure with no arguments "
 " which returns a list containing the predecessor nodes for each node."))

 (describe "'outedges" ("returns a procedure " (tt "LAMBDA N")
 " which returns a list with the outgoing edges of node " (tt "N")))
 (describe "'inedges" ("returns a procedure " (tt "LAMBDA N")
 " which returns a list with the incoming edges of node " (tt "N")))
 (describe "'hasedge" ("returns a procedure " (tt "LAMBDA I J")
 " which returns true if edge " (tt "I > J") " exists in the graph "
 "and false otherwise"))
 (describe "'hasnode" ("returns a procedure " (tt "LAMBDA N")
 " which returns true if node " (tt "N") " exists in the graph "
 "and false otherwise"))
 (describe "'nodeinfo" ("returns a procedure " (tt "LAMBDA N")
 " which returns the metadata for node " (tt "N")))
 (describe "'nodeinfoset!" ("returns a procedure " (tt "LAMBDA N V")
 " which sets the metadata for node " (tt "N")))
 (describe "'foreachnode" ("returns an iterator procedure " (tt "LAMBDA F")
 " which iterates over the nodes in the graph "
 "by invoking function " (tt "F") " on the node number and metadata "
 "of each node"))
 (describe "'foreachedge" ("returns an iterator procedure " (tt "LAMBDA F")
 " which iterates over the edges in the graph "
 "by invoking function " (tt "F") " on each edge"))
 (describe "'debug" ("returns a list with the internal representation of the graph"))))))

 (examples (pre #<~A" ni nj)))))
 (else (error "invalid edge " e))))
 usedby)
(print ((g 'nodes)))
(print ((g 'edges)))

((g 'removenode!) 0)
(print ((g 'nodes)))
(print ((g 'edges)))
EOF
)
 (license
 "Copyright Ivan Raikov and the Okinawa Institute of Science and Technology

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or (at
your option) any later version.

This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.

A full copy of the GPL license can be found at
.")))))

(if (eggdoc>html doc) (void))
Index: release/4/digraph/trunk/digraph.meta
===================================================================
 release/4/digraph/trunk/digraph.meta (revision 20018)
+++ release/4/digraph/trunk/digraph.meta (revision 20021)
@@ 5,5 +5,5 @@
; List here all the files that should be bundled as part of your egg.
 (files "digraph.scm" "digrapheggdoc.scm" "digraph.setup" "tests")
+ (files "digraph.scm" "digraph.setup" "tests")
; Your egg's license:
@@ 18,7 +18,5 @@
; A list of eggs digraph depends on.
 (needs eggdoc dynvector matchable)

 (eggdoc "digrapheggdoc.scm")
+ (needs dynvector matchable)
(author "Ivan Raikov")
Index: release/4/digraph/trunk/digraph.setup
===================================================================
 release/4/digraph/trunk/digraph.setup (revision 20018)
+++ release/4/digraph/trunk/digraph.setup (revision 20021)
@@ 6,6 +6,4 @@
(compile O2 d0 s digraph.scm j digraph)
(compile O2 d0 s digraph.import.scm)

(run (csi s digrapheggdoc.scm > digraph.html))
(installextension
@@ 18,5 +16,5 @@
; Assoc list with properties for your extension:
 `((version 1.11)
+ `((version 1.12)
(documentation "digraph.html")
))