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

Method add_edges

python/dgl/graph_index.py:103–116  ·  view source on GitHub ↗

Add many edges. Parameters ---------- u : utils.Index The src nodes. v : utils.Index The dst nodes.

(self, u, v)

Source from the content-addressed store, hash-verified

101 self.clear_cache()
102
103 def add_edges(self, u, v):
104 """Add many edges.
105
106 Parameters
107 ----------
108 u : utils.Index
109 The src nodes.
110 v : utils.Index
111 The dst nodes.
112 """
113 u_array = u.todgltensor()
114 v_array = v.todgltensor()
115 _CAPI_DGLGraphAddEdges(self, u_array, v_array)
116 self.clear_cache()
117
118 def clear(self):
119 """Clear the graph."""

Callers 1

from_cooFunction · 0.45

Calls 2

clear_cacheMethod · 0.95
todgltensorMethod · 0.80

Tested by

no test coverage detected