Mirror 'root' functionality for leaf nodes
[cl-graph.git] / dev / package.lisp
1 ;;;-*- Mode: Lisp; Package: COMMON-LISP-USER -*-
2
3 #| simple-header
4
5 Author: Gary King, et. al.
6
7 DISCUSSION
8
9 |#
10 (in-package #:common-lisp-user)
11
12 (defpackage #:cl-graph
13   (:use #:common-lisp #:metatilities #:cl-containers #:metabang-bind)
14   (:nicknames #:metabang.graph)
15   (:documentation "CL-Graph is a Common Lisp library for manipulating graphs and running graph algorithms.")
16   
17   (:export 
18    #:with-changing-vertex
19    
20    #:make-graph
21    #:basic-graph
22    
23    #:add-edge-between-vertexes     ; graph { value | vertex } { value | vertex }
24    #:delete-edge-between-vertexes  ; graph { value | vertex } { value | vertex }
25    #:add-vertex                    ; graph { value | vertex }
26    #:find-vertex                   ; graph { value | vertex }
27    #:find-edge                     ; graph edge
28    #:find-edge-between-vertexes    ; graph { vertex | value } { vertex | value }
29    #:find-vertex-if
30    #:find-vertexes-if
31    #:search-for-vertex
32    
33    #:iterate-container             ; graph fn
34    #:iterate-vertexes
35    #:vertexes
36    #:source-edges
37    #:target-edges
38    #:child-vertexes
39    #:parent-vertexes
40    #:neighbor-vertexes
41    #:other-vertex
42    
43    #:edge-count                    ; graph
44    #:vertex-count                  ; graph
45    #:source-edge-count             ; vertex
46    #:target-edge-count             ; vertex
47    
48    #:rootp                         ; vertex
49    #:leafp                         ; vertex
50    #:graph-roots                   ; graph
51    #:graph-leafs                   ; graph
52    
53    #:topological-sort              ; graph
54    #:depth                         ; graph | vertex
55    #:depth-level
56    
57    #:get-transitive-closure        ;; CTM
58    #:make-filtered-graph           ;; CTM
59    
60    #:adjacentp
61    #:in-cycle-p                    ; graph vertex
62    #:force-undirected
63    
64    #:renumber-vertexes
65    #:renumber-edges
66    
67    #:generate-directed-free-tree
68    
69    #:contains-undirected-edge-p
70    #:contains-directed-edge-p
71    
72    #:undirected-edge-p
73    #:directed-edge-p
74    #:tagged-edge-p
75    #:untagged-edge-p
76    #:tag-all-edges
77    #:untag-all-edges
78    #:graph->dot
79    #:vertex->dot
80    #:edge->dot
81    #:graph->dot-properties
82    #:subgraph-containing
83    #:graph->dot-external
84    #:dot-graph
85    #:dot-vertex
86    #:dot-edge
87    #:dot-attributes
88    #:layout-graph-with-graphviz
89    #:dot-attribute-value
90    
91    #:connected-graph-p
92    #:find-connected-components
93    #:connected-component-count
94    
95    #:target-vertex
96    #:source-vertex
97    
98    #:add-edge                      ; graph edge
99    #:delete-edge                   ; graph edge
100    #:delete-all-edges
101
102    #:add-vertex                    ; graph { value | vertex }
103    #:delete-vertex                 ; graph { value | vertex }
104    #:find-vertex                   ; graph { value | vertex }
105    #:find-edge                     ; graph edge
106    #:find-edge-between-vertexes    ; graph { vertex | value } { vertex | value }
107    #:find-edge-between-vertexes-if ; graph { vertex | value } { vertex | value } fn
108    #:find-edge-if                  ; graph
109    #:find-edges-if                 ; graph
110    
111    #:edges                         ; graph | vertex
112    #:iterate-edges                 ; graph fn
113    #:iterate-source-edges          ; vertex fn
114    #:iterate-target-edges          ; vertex fn
115    #:iterate-children              ; vertex (nodes) fn
116    #:iterate-parents               ; vertex (nodes) fn
117    #:iterate-neighbors             ; vertex (all neighbors) fn
118    #:has-children-p
119    #:has-parent-p
120    #:number-of-neighbors
121    #:graph-vertexes
122    #:replace-vertex
123
124    #:edge-count                    ; graph
125    #:vertex-count                  ; graph
126    
127    #:topological-sort              ; graph
128    #:depth                         ; graph | vertex
129    #:depth-level
130    
131    #:get-transitive-closure        ;; CTM
132    #:make-filtered-graph           ;; CTM
133    
134    #:adjacentp
135    #:in-cycle-p                    ; graph vertex
136    #:in-undirected-cycle-p         ; graph vertex
137    #:any-undirected-cycle-p        ; graph
138    #:force-undirected
139    #:vertices-share-edge-p
140    
141    #:map-paths
142    #:map-shortest-paths
143    
144    ;;; depth first search 
145    #:dfs-edge-type
146    #:dfs-back-edge-p 
147    #:dfs-tree-edge-p
148    #:edge-lessp-by-direction
149    #:out-edge-for-vertex-p
150    #:dfs
151    #:rooted-dfs
152
153    ;;; minimum-spanning-tree
154    #+Ignore #:add-edges-to-graph
155    
156    #:make-graph-from-vertexes
157    #:edge-lessp-by-weight
158    #:minimum-spanning-tree
159    
160    ;;; mapping
161    #+Ignore #:map-over-all-combinations-of-k-vertexes
162    #+Ignore #:map-over-all-combinations-of-k-edges
163    
164    #:project-bipartite-graph
165    
166    #:make-vertex-edges-container 
167    #:make-vertex-for-graph
168
169    #:vertex-degree-counts
170    #:vertex-degree
171    #:average-vertex-degree
172    #:vertex-clustering-coefficient
173    #:average-vertex-clustering-coefficient
174    
175    #:graph-mixing-matrix
176    #:graph-edge-mixture-matrix
177    #:assortativity-coefficient
178    #:vertex-degree-summary
179    #:connected-components
180    #:average-local-clustering-coefficient
181    #:vertex-triangle-count
182    #:graph-edges
183    #:graph-vertexes)
184
185   (:export
186    #:print-dot-key-value
187    #:dot-attribute-value
188    #:dot-attributes-mixin
189    #:*dot-graph-attributes*
190    ))