Companion

object Companion

Functions

Link copied to clipboard
fun <T, W> build(builder: MutableGraph<T, W>.() -> Unit): MutableGraph<T, W>

Builds a new MutableGraph by applying builder to a fresh, empty instance.

Link copied to clipboard

Returns a new, empty MutableGraph (no nodes, no edges).

Link copied to clipboard
fun <T, W> of(edges: Iterable<Edge<T, W>>): MutableGraph<T, W>
fun <T, W> of(edges: Sequence<Edge<T, W>>): MutableGraph<T, W>

Creates a new MutableGraph containing exactly the given edges, and their endpoint nodes.

fun <T, W> of(edge: Edge<T, W>, vararg edges: Edge<T, W>): MutableGraph<T, W>

Creates a new MutableGraph containing exactly edge (and any edges), and their endpoint nodes.