View source on GitHub |
Adds an edge to a given graph.
nsl.tools.add_edge(
graph, edge
)
If an edge between the two nodes already exists, the one with the largest weight is retained.
Returns | |
---|---|
True if and only if a new edge was added to graph .
|