Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
index error fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
vipul79321 committed May 30, 2020
1 parent 37ac47a commit a049556
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/sage/graphs/distances_all_pairs.pyx
Expand Up @@ -1318,7 +1318,7 @@ cdef uint32_t diameter_dragan(short_digraph g):
cdef list active = list(range(n))

# Algorithm
while LB < UB:
while LB < UB and active:
# 1. Select vertex u with maximum eccentricity upper bound
tmp = 0
for i, v in enumerate(active):
Expand Down Expand Up @@ -1350,7 +1350,6 @@ cdef uint32_t diameter_dragan(short_digraph g):
idx = i
active[idx], active[-1] = active[-1], active[idx]
x = active.pop()

ecc_x = simple_BFS(g, x, distances, NULL, waiting_list, seen)
LB = max(LB, ecc_x)

Expand Down

0 comments on commit a049556

Please sign in to comment.