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
89 #:find-connected-components
90 #:connected-component-count
95 #:add-edge ; graph edge
96 #:delete-edge ; graph edge
98 #:add-vertex ; graph { value | vertex }
99 #:delete-vertex ; graph { value | vertex }
100 #:find-vertex ; graph { value | vertex }
101 #:find-edge ; graph edge
102 #:find-edge-between-vertexes ; graph { vertex | value } { vertex | value }
103 #:find-edge-between-vertexes-if ; graph { vertex | value } { vertex | value } fn
104 #:find-edge-if ; graph
105 #:find-edges-if ; graph
107 #:edges ; graph | vertex
108 #:iterate-edges ; graph fn
109 #:iterate-source-edges ; vertex fn
110 #:iterate-target-edges ; vertex fn
111 #:iterate-children ; vertex (nodes) fn
112 #:iterate-parents ; vertex (nodes) fn
113 #:iterate-neighbors ; vertex (all neighbors) fn
116 #:number-of-neighbors
119 #:vertex-count ; graph
121 #:topological-sort ; graph
122 #:depth ; graph | vertex
125 #:get-transitive-closure ;; CTM
126 #:make-filtered-graph ;; CTM
129 #:in-cycle-p ; graph vertex
130 #:in-undirected-cycle-p ; graph vertex
131 #:any-undirected-cycle-p ; graph
133 #:vertices-share-edge-p
138 ;;; depth first search
142 #:edge-lessp-by-direction
143 #:out-edge-for-vertex-p
146 ;;; minimum-spanning-tree
147 #+Ignore #:add-edges-to-graph
149 #:make-graph-from-vertexes
150 #:edge-lessp-by-weight
151 #:minimum-spanning-tree
154 #+Ignore #:map-over-all-combinations-of-k-vertexes
155 #+Ignore #:map-over-all-combinations-of-k-edges
157 #:project-bipartite-graph
159 #:make-vertex-edges-container
161 #:vertex-degree-counts
163 #:average-vertex-degree
164 #:vertex-clustering-coefficient
165 #:average-vertex-clustering-coefficient
167 #:graph-mixing-matrix
168 #:graph-edge-mixture-matrix
169 #:assortativity-coefficient
170 #:vertex-degree-summary))