MCPcopy
hub / github.com/dmlc/dgl / edge_pair_input

Function edge_pair_input

tests/python/common/test_heterograph-misc.py:18–26  ·  view source on GitHub ↗
(sort=False)

Source from the content-addressed store, hash-verified

16# - has self loop
17# - no multi edge
18def edge_pair_input(sort=False):
19 if sort:
20 src = [0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 5, 5, 6, 7, 7, 7, 9]
21 dst = [4, 6, 9, 3, 5, 3, 7, 5, 8, 1, 3, 4, 9, 1, 9, 6, 2, 8, 9, 2]
22 return src, dst
23 else:
24 src = [0, 0, 4, 5, 0, 4, 7, 4, 4, 3, 2, 7, 7, 5, 3, 2, 1, 9, 6, 1]
25 dst = [9, 6, 3, 9, 4, 4, 9, 9, 1, 8, 3, 2, 8, 1, 5, 7, 3, 2, 6, 5]
26 return src, dst
27
28
29def nx_input():

Callers 8

nx_inputFunction · 0.85
elist_inputFunction · 0.85
scipy_coo_inputFunction · 0.85
scipy_csr_inputFunction · 0.85
gen_by_mutationFunction · 0.85
_test_oneFunction · 0.85
_test_csr_oneFunction · 0.85
test_is_sortedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected