one_edge_augmentation(G, avail=None, weight=None, partial=False)
Equivalent to k_edge_augmentation
when k=1. Adding the resulting edges to G will make it 1-edge-connected. The solution is optimal for both weighted and non-weighted variants.
Uses either unconstrained_one_edge_augmentation
or weighted_one_edge_augmentation
depending on whether avail
is specified. Both algorithms are based on finding a minimum spanning tree. As such both algorithms find optimal solutions and run in linear time.
An undirected graph.
For more details, see k_edge_augmentation
.
key to use to find weights if avail
is a set of 3-tuples. For more details, see k_edge_augmentation
.
If partial is True and no feasible k-edge-augmentation exists, then the augmenting edges minimize the number of connected components.
If partial is False and no one-edge-augmentation exists.
Finds minimum weight set of edges to connect G.
Edges in the one-augmentation of G
k_edge_augmentation
func
The following pages refer to to this document either explicitly or contain code examples using this.
networkx.algorithms.connectivity.edge_augmentation.weighted_one_edge_augmentation
networkx.algorithms.connectivity.edge_augmentation.unconstrained_one_edge_augmentation
Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.
Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)
SVG is more flexible but power hungry; and does not scale well to 50 + nodes.
All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them