Graphs

object Graphs(source)

Functions

Link copied to clipboard
fun <V> bfsVertices(start: V, adjacent: (V) -> Iterable<V>): Iterator<V>
fun <V> bfsVertices(start: Iterable<V>, adjacent: (V) -> Iterable<V>): Iterator<V>
Link copied to clipboard
fun <V, E> cycles(graph: DirectedGraph<V, E>): List<List<V>>
Link copied to clipboard
fun <V, E> shortestPath(graph: DirectedGraph<V, E>, start: Iterable<V>, accept: (V) -> Boolean, cost: (IEdge<V, E>) -> Double): List<V>?
Link copied to clipboard
fun <V> stronglyConnectedComponents(graph: DirectedGraph<V, *>, includeSingletons: Boolean): Set<Set<V>>
Link copied to clipboard
fun <V, E> stronglyConnectedSubgraphs(graph: DirectedGraph<V, E>, includeSingletons: Boolean): List<DirectedGraph<V, E>>