Oglądaj prezentacje, sesje produktowe, warsztaty i nie tylko z playlisty Google I / O See


Adds an edge to a given graph.

If an edge between the two nodes already exists, the one with the largest weight is retained.

graph A dict: source_id -> (target_id -> weight) to be augmented.
edge A list (or tuple) of the form [source, target, weight], where source and target are strings, and weight is a numeric value of type string or float. The 'weight' component is optional; if not supplied, it defaults to 1.0.

True if and only if a new edge was added to graph.