Show More
@@ -42,7 +42,7 b' def buildgraph(rng, nodes=100, rootprob=' | |||||
42 | p1 = i - 1 |
|
42 | p1 = i - 1 | |
43 | else: |
|
43 | else: | |
44 | p1 = rng.randrange(i - 1) |
|
44 | p1 = rng.randrange(i - 1) | |
45 | p2 = rng.choice(range(0, p1) + range(p1 + 1, i)) |
|
45 | p2 = rng.choice(list(range(0, p1)) + list(range(p1 + 1, i))) | |
46 | graph[i] = [p1, p2] |
|
46 | graph[i] = [p1, p2] | |
47 | elif rng.random() < prevprob: |
|
47 | elif rng.random() < prevprob: | |
48 | graph[i] = [i - 1] |
|
48 | graph[i] = [i - 1] |
General Comments 0
You need to be logged in to leave comments.
Login now