Class Graph-Container-Vertex

A graph container vertex keeps track of its edges in the the vertex-edges slot. The storage for this defaults to a vector-container but can be changed using the vertex-edges-container-class initarg.

Part of:

package cl-graph, class dot-vertex

Default initargs

:vertex-edges-container-class → 'VECTOR-CONTAINER

Direct Subclass

dot-vertex

Slot

color
The `color` is used by some algorithms for bookkeeping. [?? Should probably be in a mixin]
Initargs:color; Accessors:color.
depth-level
`Depth-level` is used by some algorithms for bookkeeping. [?? Should be in a mixin]
Initform:0, Initargs:depth-level; Accessors:depth-level; Type:number.
discovery-time
`Discovery-time` is used by some algorithms for bookkeeping. [?? Should be in a mixin]
Initform:-1, Initargs:discovery-time; Accessors:discovery-time.
elementInitargs:element, value; Accessors:value, element.
finish-time
`Finish-time` is used by some algorithms for bookkeeping. [?? Should be in a mixin]
Initform:-1, Initargs:finish-time; Accessors:finish-time.
graph
The `graph` of which this edge is a part.
Initargs:graph; Reader:graph.
next-node
`Next-node` is used by some algorithms for bookkeeping. [?? Should be in a mixin]
Initargs:next-node; Accessors:next-node.
previous-node
`Previous-node` is used by some algorithms for bookkeeping. [?? Should be in a mixin]
Initargs:previous-node; Accessors:previous-node.
rank
The `rank` is used by some algorithms for bookkeeping. [?? Should be in a mixin]
Initargs:rank; Accessors:rank.
tag
The `tag` is used by some algorithms for bookkeeping. [?? Should probably be in a mixin]
Initargs:tag; Accessors:tag.
vertex-edgesReader:vertex-edges.
vertex-id
`Vertex-id` is used internally to keep track of vertexes.
Initform:0, Initargs:vertex-id; Reader:vertex-id.

Direct Method

add-edge-to-vertexAttaches the edge `edge` to the vertex `vertex`.
find-edge-between-vertexesSearches `graph` for an edge that connects vertex-1 and vertex-2. [?? Ignores error-if-not-found...
find-edge-between-vertexes-ifFinds and returns an edge between value-or-vertex-1 and value-or-vertex-2 if one exists. Unless e...
has-children-pIn a directed graph, returns true if vertex has any edges that point from vertex to some other ve...
has-parent-pIn a directed graph, returns true if vertex has any edges that point from some other vertex to th...
iterate-childrenCalls fn on every vertex that is either connected to vertex by an undirected edge or is at the ta...
iterate-edgesCalls `fn` on each edge of graph or vertex.
iterate-neighborsCalls fn on every vertex adjecent to vertex See also iterate-children and iterate-parents.
iterate-parentsCalls fn on every vertex that is either connected to vertex by an undirected edge or is at the so...
iterate-source-edgesIn a directed graph, calls `fn` on each edge of a vertex that begins at vertex. In an undirected ...
iterate-target-edgesIn a directed graph, calls `fn` on each edge of a vertex that ends at vertex. In an undirected gr...
make-vertex-edges-containerCalled during the initialization of a vertex to create the create the container used to store the...
other-vertexAssuming that the value-or-vertex corresponds to one of the vertexes for `edge`, this method retu...
vertices-share-edge-pReturn true if vertex-1 and vertex-2 are connected by an edge. [?? Compare adjacentp]

Other Method

add-edge-between-vertexesAdds an edge between two vertexes and returns it. If force-new? is true, the edge is added eve...
add-vertexAdds a vertex to a graph. If called with a vertex, then this vertex is added. If called with a va...
adjacentpReturn true if vertex-1 and vertex-2 are connected by an edge. [?? compare with vertices-share-ed...
assign-levelSets the depth of `vertex` to level and then recursively sets the depth of all of the children of...
breadth-first-search-graph
breadth-first-visitor
delete-vertexRemove a vertex from a graph. The 'vertex-or-value' argument can be a vertex of the graph or a 'v...
dfs
dfs-visit
edge-countReturns the number of edges attached to `vertex`. Compare with the more flexible `vertex-degree`.
edgesReturns a list of the edges of `thing`.
in-cycle-pReturns true if `start-vertex` is in some cycle in `graph`. This uses child-vertexes to generate ...
in-undirected-cycle-pReturn true if-and-only-if an undirected cycle in graph is reachable from start-vertex.
make-edge-for-graphIt should not usually necessary to call this in user code. Creates a new edge between vertex-1 an...
map-over-all-combinations-of-k-edges
mst-find-set
mst-link
mst-make-set
mst-tree-union
out-edge-for-vertex-pReturns true if the edge is connected to vertex and is either an undirected edge or a directed ed...
replace-vertexReplace vertex `old` in graph `graph` with vertex `new`. The edge structure of the graph is maint...
rootpReturns true if `vertex` is a root vertex (i.e., it has no incoming (source) edges).
search-for-node
search-for-node*
search-for-vertexSearch 'graph' for a vertex with element 'value'. The 'key' function is applied to each element b...
setfelement
source-edge-countReturns the number of source edges of vertex (cf. source-edges). [?? could be a defun]
source-edgesReturns a list of the source edges of `vertex`. [?? Could be a defun].
subgraph-containingReturns a new graph that is a subset of `graph` that contains `vertex` and all of the other verte...
tag-all-edgesSets the `tag` of all the edges of `thing` to true. [?? why does this exist?]
target-edge-countReturns the number of target edges of vertex (cf. target-edges). [?? could be a defun]
target-edgesReturns a list of the target edges of `vertex`. [?? Could be a defun].
traverse-elements-helperWIP
untag-all-edgesSets the `tag` of all the edges of `thing` to nil. [?? why does this exist?]
vertex->dotUnless a different vertex-formatter is specified with a keyword argument, this is used by graph->...