MCPcopy Create free account
hub / github.com/alibaba/euler / read_adj

Function read_adj

tf_euler/python/dataset/multigraph_util.py:23–32  ·  view source on GitHub ↗
(adj)

Source from the content-addressed store, hash-verified

21
22
23def read_adj(adj):
24 f = open(adj)
25 lines = f.readlines()
26 edge_list = []
27 for line in lines:
28 src_dst = line.split(',')
29 pair = [int(src_dst[0].strip()) - 1, int(src_dst[1].strip()) - 1]
30 edge_list.append(pair)
31 f.close()
32 return edge_list
33
34
35def read_graph_indicator(graph_indicator):

Callers 1

convert2jsonMethod · 0.85

Calls 1

appendMethod · 0.80

Tested by

no test coverage detected