Skip to content

Commit

Permalink
fix : code readability fixed. (Sepand's comment)
Browse files Browse the repository at this point in the history
  • Loading branch information
sadrasabouri committed Sep 30, 2024
1 parent 61a081a commit f4613c3
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions pyrgg/engines/erdos_reyni.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,9 @@ def edge_gen(n, m, direct):
edge_mold = []
max_edge = (n * (n - 1)) // 2
if direct:
m = min(m, 2 * max_edge)
edge_mold = m * [1] + (2 * max_edge - m) * [0]
else:
m = min(m, max_edge)
edge_mold = m * [1] + (max_edge - m) * [0]
max_edge *= 2
m = min(m, max_edge)
edge_mold = m * [1] + (max_edge - m) * [0]
shuffle(edge_mold)
for i in range(1, n + 1):
edge_dic[i] = []
Expand Down

0 comments on commit f4613c3

Please sign in to comment.