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

Method node_subgraph

python/dgl/graph_index.py:562–576  ·  view source on GitHub ↗

Return the induced node subgraph. Parameters ---------- v : utils.Index The nodes. Returns ------- SubgraphIndex The subgraph index.

(self, v)

Source from the content-addressed store, hash-verified

560 return utils.toindex(_CAPI_DGLGraphOutDegrees(self, v_array))
561
562 def node_subgraph(self, v):
563 """Return the induced node subgraph.
564
565 Parameters
566 ----------
567 v : utils.Index
568 The nodes.
569
570 Returns
571 -------
572 SubgraphIndex
573 The subgraph index.
574 """
575 v_array = v.todgltensor()
576 return _CAPI_DGLGraphVertexSubgraph(self, v_array)
577
578 def node_halo_subgraph(self, v, num_hops):
579 """Return an induced subgraph with halo nodes.

Callers 14

node_subgraphsMethod · 0.95
node_subgraphFunction · 0.45
reorder_graphFunction · 0.45
test_convertFunction · 0.45
test_frame_deviceFunction · 0.45
test_set_batch_infoFunction · 0.45
forwardMethod · 0.45
forwardMethod · 0.45
sample_subgraphMethod · 0.45
trainFunction · 0.45
main_sample.pyFile · 0.45
__getitem__Method · 0.45

Calls 1

todgltensorMethod · 0.80

Tested by 3

test_convertFunction · 0.36
test_frame_deviceFunction · 0.36
test_set_batch_infoFunction · 0.36