(use eggdoc) (define doc `((eggdoc:begin (name "graph-cycles") (description "Enumerate the simple cycles 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 unit tests to use testbase") (version "1.5" "Build script updated for better cross-platform compatibility") (version "1.4" "eggdoc documentation fix") (version "1.3" "License upgrade to GPL v3") (version "1.2" "Added support for chicken-setup -test") (version "1.1" "Corrected a mistake in the documentation title") (version "1.0" "Initial release")) (requires (url "iset.html" "iset") (url "graph-scc.html" "graph-scc") (url "matchable.html" "matchable")) (usage "(require-extension graph-cycles)") (download "graph-cycles.egg") (documentation (p "The graph-cycles library enumerates all simple cycles in a graph, " "where the graph object follows the API of e.g. the " (url "digraph.html" "digraph egg") ".") (subsection "Procedures" (procedure "graph-cycles-fold:: G F INITIAL -> STATE" (p "graph cycles iterator; every cycle is reprensented as a list of edges. " "Adjacent edges are adjacent in the list; the cycles are folded together " "using the user-supplied function " (tt "F") ", which is of the form " (tt "LAMBDA CYCLE STATE"))))) (examples (pre #<~A" ni nj))))) (else (error "invalid edge " e)))) used-by) (define roots (map car ((g 'roots)))) ;; accumulate all cycles in a list (graph-cycles-fold g (lambda (cycle ax) (cons cycle 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))