PersistentDirectedGraph
data class PersistentDirectedGraph<T>(val vertices: PersistentSet<T> = persistentSetOf(), adjacency: PersistentMap<T, PersistentSet<T>> = persistentMapOf()) : Graph<T>
An immutable directed graph using persistent data structures. Updates return new instances that share structure with the original, providing O(log n) time complexity per operation.
Parameters
vertices
the set of vertices in the graph
adjacency
a map from each vertex to its set of neighbors (outgoing edges)
Type Parameters
T
the type of vertices in the graph
Properties
Link copied to clipboard
Converts a Graph into a VisitableOnceGraph which allows visiting each vertex only once.
Functions
Link copied to clipboard
Adds a vertex to the graph.
Link copied to clipboard
Adds a vertex and an edge in a single operation.
Link copied to clipboard
Finds a Subdocument.Resource vertex in the graph by its absolute path.
Link copied to clipboard