link
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.