Package blue. bluejam. algorithms. kotlin. graph
Types
Functions
Link copied to clipboard
inline fun <T : Comparable<T>> bellmanFord(g: Graph<T>, s: Int): Triple<Array<T>, IntArray, Boolean>
Content copied to clipboard
inline fun <T : Comparable<T>> bellmanFord( g: Graph<T>, s: Int, t: Int): Triple<Array<T>, IntArray, Boolean>
Content copied to clipboard
Calculate distance from s
to t
on a graph g
. If there exists an negative loop on a path from s
to t
, put true
to the third value of a tuple.
Link copied to clipboard
Link copied to clipboard
fun <T : Comparable<T>> listRequiredVertices( g: Graph<T>, s: Int, t: Int): BooleanArray
Content copied to clipboard
Link copied to clipboard
fun <T : Comparable<T>> topologicalSort(g: Graph<T>): Pair<Boolean, IntArray>
Content copied to clipboard