Return the induced node subgraph. Parameters ---------- v : utils.Index The nodes. Returns ------- SubgraphIndex The subgraph index.
(self, v)
| 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. |