Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dgl
Commits
5ea7a250
Unverified
Commit
5ea7a250
authored
Jun 08, 2019
by
Quan (Andy) Gan
Committed by
GitHub
Jun 08, 2019
Browse files
Fix random BFS traversal failures (#621)
Essentially a redo of PR #612 which is erased by git merge somehow.
parent
7149650f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
tests/compute/test_traversal.py
tests/compute/test_traversal.py
+4
-2
No files found.
tests/compute/test_traversal.py
View file @
5ea7a250
...
...
@@ -31,6 +31,8 @@ def test_bfs(n=100):
edges_nx
.
append
(
edge_frontier
)
frontier
=
set
([
v
])
edge_frontier
=
set
([
g
.
edge_id
(
u
,
v
)])
# avoids empty successors
if
len
(
frontier
)
>
0
and
len
(
edge_frontier
)
>
0
:
layers_nx
.
append
(
frontier
)
edges_nx
.
append
(
edge_frontier
)
return
layers_nx
,
edges_nx
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment