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

Method has_edges_between

python/dgl/graph_index.py:254–273  ·  view source on GitHub ↗

Return true if the edge exists. Parameters ---------- u : utils.Index The src nodes. v : utils.Index The dst nodes. Returns ------- utils.Index 0-1 array indicating existence

(self, u, v)

Source from the content-addressed store, hash-verified

252 return bool(_CAPI_DGLGraphHasEdgeBetween(self, int(u), int(v)))
253
254 def has_edges_between(self, u, v):
255 """Return true if the edge exists.
256
257 Parameters
258 ----------
259 u : utils.Index
260 The src nodes.
261 v : utils.Index
262 The dst nodes.
263
264 Returns
265 -------
266 utils.Index
267 0-1 array indicating existence
268 """
269 u_array = u.todgltensor()
270 v_array = v.todgltensor()
271 return utils.toindex(
272 _CAPI_DGLGraphHasEdgesBetween(self, u_array, v_array)
273 )
274
275 def predecessors(self, v, radius=1):
276 """Return the predecessors of the node.

Callers

nothing calls this directly

Calls 1

todgltensorMethod · 0.80

Tested by

no test coverage detected