edgegraph.builder.explicit

edgegraph.builder.explicit#

Build graphs in the most manual form possible; taking two vertices and linking them.

This module provides facilities for explicit, direct linking of vertices in order to gradually build out a graph.

Most of the functions in this module are one-liners. Seriously. It exists to standardize the methods by which links are associated, so that changes to the structure classes can occur without breaking everyone’s code – instead, these functions will get the necessary updates to match, and the API stays unchanged.

Functions

link_directed(v1, v2[, dontdup])

Create a DirectedEdge between the two vertices.

link_from_to(v1, lnktype, v2[, dontdup])

Create a link of type lnktype from v1 to v2.

link_undirected(v1, v2[, dontdup])

Create a UnDirectedEdge between the two vertices.

unlink(v1, v2[, destroy])

Remive all links between v1 and v2.