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
6858ed54
Commit
6858ed54
authored
Jun 15, 2018
by
Minjie Wang
Browse files
WIP: topdown example
parent
5b5baee1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
python/dgl/graph.py
python/dgl/graph.py
+8
-3
No files found.
python/dgl/graph.py
View file @
6858ed54
...
...
@@ -244,9 +244,14 @@ class DGLGraph(DiGraph):
preds
=
defaultdict
(
list
)
for
uu
,
vv
in
utils
.
edge_iter
(
u
,
v
):
preds
[
vv
].
append
(
uu
)
dst
=
preds
.
keys
()
src
=
[
preds
[
d
]
for
d
in
dst
]
self
.
recvfrom
(
dst
,
src
)
if
len
(
preds
)
==
1
:
dst
=
list
(
preds
.
keys
())[
0
]
src
=
preds
[
dst
]
self
.
recvfrom
(
dst
,
src
)
elif
len
(
preds
)
>
1
:
dst
=
list
(
preds
.
keys
())
src
=
[
preds
[
d
]
for
d
in
dst
]
self
.
recvfrom
(
dst
,
src
)
def
update_to
(
self
,
u
):
"""Pull messages from the node's predecessors and then update it.
...
...
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