Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrickOHara committed Nov 29, 2020
1 parent 70811fc commit 13a410b
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions tspwplib/sparsity.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,15 @@
def remove_random_edges_from_graph(
G: nx.Graph, edge_removal_probability: float = 0.5
) -> nx.Graph:
"""Remove edges from the graph to make it more sparse
"""Remove edges from the graph to make it more sparse.
Edges are removed randomly with uniform and indepedent probability.
Args:
G: Complete graph
Keyword args:
edge_removal_probability: Probability of removing an edge from G
Returns:
New graph with edge removed
Note:
Edges are removed randomly with uniform and indepedent probability
"""
# make copy of graph to avoid editing original copy
H = G.copy()
Expand Down

0 comments on commit 13a410b

Please sign in to comment.