link

fun link(from: V, to: V, edge: E)(source)


fun link(from: V, to: V, edge: E, merge: (E, E) -> E)(source)

Links two vertices in the directed graph with an edge, merging edges if one already exists.

Parameters

from

The starting vertex of the edge.

to

The ending vertex of the edge.

edge

The edge to link between the vertices.

merge

A function to handle the merging of edges when an edge already exists between the vertices.