(use eggdoc) (define doc `((eggdoc:begin (name "graph-scc") (description "Compute strongly-connected components (SCC) of a graph.") (author (url "http://chicken.wiki.br/users/ivan-raikov" "Ivan Raikov")) (history (version "1.8" "Ported to Chicken 4") (version "1.7" "Now using matchable extension") (version "1.6" "Updated meta file for testbase") (version "1.5" "Updated units tests to use testbase") (version "1.4" "Build script updated for better cross-platform compatibility") (version "1.3" "eggdoc documentation fix") (version "1.2" "License upgrade to GPL v3.") (version "1.1" "Added support for chicken-setup -test") (version "1.0" "Initial release")) (requires (url "iset.html" "iset") (url "matchable.html" "matchable")) (usage "(require-extension graph-scc)") (download "graph-scc.egg") (documentation (p "The graph-scc library computes the strongly connected components (SCC) of a graph, " "using Tarjan's algorithm, and a graph object that follows the API of e.g. the " (url "digraph.html" "digraph egg") ".") (subsection "SCC procedures" (procedure "graph-scc-fold:: G F INITIAL -> STATE" (p "SCC graph iterator; every SCC is represented as a list of nodes. " " the nodes in each SCC are folded together using the user-supplied " " function " (tt "F") ", which is of the form " (tt "LAMBDA SCC STATE"))))) (examples (pre #<~A" ni nj))))) (else (error "invalid edge " e)))) used-by) (define roots (map car ((g 'roots)))) ;; accumulate all SCC in a list (graph-scc-fold g (lambda (scc ax) (cons scc ax)) (list)) 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))