graphs
library
Functions
-
crawlAsync<K extends Object, V>(Iterable<K> roots, FutureOr<V> readNode(K), FutureOr<Iterable<K>> edges(K, V))
→ Stream<V>
-
Finds and returns every node in a graph who's nodes and edges are
asynchronously resolved.
-
shortestPath<T extends Object>(T start, T target, Iterable<T> edges(T), {bool equals(T, T)?, int hashCode(T)?})
→ Iterable<T>?
-
Returns the shortest path from
start
to target
given the directed
edges of a graph provided by edges
.
-
shortestPaths<T extends Object>(T start, Iterable<T> edges(T), {bool equals(T, T)?, int hashCode(T)?})
→ Map<T, Iterable<T>>
-
Returns a Map of the shortest paths from
start
to all of the nodes in
the directed graph defined by edges
.
-
stronglyConnectedComponents<T extends Object>(Iterable<T> nodes, Iterable<T> edges(T), {bool equals(T, T)?, int hashCode(T)?})
→ List<List<T>>
-
Finds the strongly connected components of a directed graph using Tarjan's
algorithm.
-
topologicalSort<T>(Iterable<T> nodes, Iterable<T> edges(T), {bool equals(T, T)?, int hashCode(T)?, Comparator<T>? secondarySort})
→ List<T>
-
Returns a topological sort of the nodes of the directed edges of a graph
provided by
nodes
and edges
.
-
transitiveClosure<T extends Object>(Iterable<T> nodes, Iterable<T> edges(T), {bool equals(T, T)?, int hashCode(T)?, bool acyclic = false})
→ Map<T, Set<T>>
-
Returns a transitive closure of a directed graph provided by
nodes
and
edges
.
Exceptions / Errors
-
CycleException<T>
-
An exception indicating that a cycle was detected in a graph that was
expected to be acyclic.