Return an induced subgraph with halo nodes. Parameters ---------- v : utils.Index The nodes. num_hops : int The number of hops in which a HALO node can be accessed. Returns ------- SubgraphIndex The subgra
(self, v, num_hops)
| 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. |
| 580 | |
| 581 | Parameters |
| 582 | ---------- |
| 583 | v : utils.Index |
| 584 | The nodes. |
| 585 | |
| 586 | num_hops : int |
| 587 | The number of hops in which a HALO node can be accessed. |
| 588 | |
| 589 | Returns |
| 590 | ------- |
| 591 | SubgraphIndex |
| 592 | The subgraph index. |
| 593 | DGLTensor |
| 594 | Indicate if a node belongs to a partition. |
| 595 | DGLTensor |
| 596 | Indicate if an edge belongs to a partition. |
| 597 | """ |
| 598 | v_array = v.todgltensor() |
| 599 | subg = _CAPI_DGLGetSubgraphWithHalo(self, v_array, num_hops) |
| 600 | inner_nodes = _CAPI_GetHaloSubgraphInnerNodes(subg) |
| 601 | return subg, inner_nodes |
| 602 | |
| 603 | def node_subgraphs(self, vs_arr): |
| 604 | """Return the induced node subgraphs. |
nothing calls this directly
no test coverage detected