1 ;;;-*- Mode: Lisp; Package: COMMON-LISP-USER -*-
5 Author: Gary King, et. al.
10 (in-package common-lisp-user)
12 (defpackage "CL-GRAPH"
13 (:use "COMMON-LISP" "METATILITIES" "CL-CONTAINERS"
14 "METABANG.BIND" "METABANG.MATH")
15 (:nicknames "METABANG.GRAPH")
16 (:documentation "CL-Graph is a Common Lisp library for manipulating graphs and running graph algorithms.")
19 #:with-changing-vertex
24 #:add-edge-between-vertexes ; graph { value | vertex } { value | vertex }
25 #:delete-edge-between-vertexes ; graph { value | vertex } { value | vertex }
26 #:add-vertex ; graph { value | vertex }
27 #:find-vertex ; graph { value | vertex }
28 #:find-edge ; graph edge
29 #:find-edge-between-vertexes ; graph { vertex | value } { vertex | value }
34 #:iterate-container ; graph fn
45 #:vertex-count ; graph
46 #:source-edge-count ; vertex
47 #:target-edge-count ; vertex
52 #:topological-sort ; graph
53 #:depth ; graph | vertex
56 #:get-transitive-closure ;; CTM
57 #:make-filtered-graph ;; CTM
60 #:in-cycle-p ; graph vertex
66 #:generate-directed-free-tree
68 #:contains-undirected-edge-p
69 #:contains-directed-edge-p
80 #:graph->dot-properties
88 #:find-connected-components
89 #:connected-component-count
94 #:add-edge ; graph edge
95 #:delete-edge ; graph edge
97 #:add-vertex ; graph { value | vertex }
98 #:delete-vertex ; graph { value | vertex }
99 #:find-vertex ; graph { value | vertex }
100 #:find-edge ; graph edge
101 #:find-edge-between-vertexes ; graph { vertex | value } { vertex | value }
102 #:find-edge-between-vertexes-if ; graph { vertex | value } { vertex | value } fn
103 #:find-edge-if ; graph
104 #:find-edges-if ; graph
106 #:edges ; graph | vertex
107 #:iterate-edges ; graph fn
108 #:iterate-source-edges ; vertex fn
109 #:iterate-target-edges ; vertex fn
110 #:iterate-children ; vertex (nodes) fn
111 #:iterate-parents ; vertex (nodes) fn
112 #:iterate-neighbors ; vertex (all neighbors) fn
115 #:number-of-neighbors
118 #:vertex-count ; graph
120 #:topological-sort ; graph
121 #:depth ; graph | vertex
124 #:get-transitive-closure ;; CTM
125 #:make-filtered-graph ;; CTM
128 #:in-cycle-p ; graph vertex
129 #:in-undirected-cycle-p ; graph vertex
130 #:any-undirected-cycle-p ; graph
132 #:vertices-share-edge-p
137 ;;; depth first search
141 #:edge-lessp-by-direction
142 #:out-edge-for-vertex-p
145 ;;; minimum-spanning-tree
146 #+Ignore #:add-edges-to-graph
148 #:make-graph-from-vertexes
149 #:edge-lessp-by-weight
150 #:minimum-spanning-tree
153 #+Ignore #:map-over-all-combinations-of-k-vertexes
154 #+Ignore #:map-over-all-combinations-of-k-edges
156 #:project-bipartite-graph
158 #:make-vertex-edges-container
160 #:vertex-degree-counts
162 #:average-vertex-degree
163 #:vertex-clustering-coefficient
164 #:average-vertex-clustering-coefficient
166 #:graph-mixing-matrix
167 #:graph-edge-mixture-matrix
168 #:assortativity-coefficient
169 #:vertex-degree-summary))