addEdge

abstract fun addEdge(from: T, to: T): Graph<T>

Adds an edge from one vertex to another.

Return

a new graph instance with the edge added

Parameters

from

the source vertex

to

the destination vertex


open fun addEdge(pair: Pair<T, T>): Graph<T>

See also