edgegraph.builder.explicit.link_directed#
- edgegraph.builder.explicit.link_directed(v1, v2, dontdup=False)#
Create a
DirectedEdgebetween the two vertices.This function instantiates a new
DirectedEdgeclass such that the givenv1is the “from” vertex and the givenv2is the “to” vertex.Before:
After:
- Parameters:
v1 (Vertex) – The origin end of the link.
v2 (Vertex) – The destination end of the link.
dontdup (bool) – If set to True, performs a check for any already-existing links between v1 and v2. If any are found (of any type, directed or undirected), no new link is created, but the already-existing one is returned silently.
- Returns:
The link that was created.
- Return type: