Return the in edges of the node(s). Parameters ---------- v : utils.Index The node(s). Returns ------- utils.Index The src nodes. utils.Index The dst nodes. utils.Index The edge ids.
(self, v)
| 401 | return src, dst, eid |
| 402 | |
| 403 | def in_edges(self, v): |
| 404 | """Return the in edges of the node(s). |
| 405 | |
| 406 | Parameters |
| 407 | ---------- |
| 408 | v : utils.Index |
| 409 | The node(s). |
| 410 | |
| 411 | Returns |
| 412 | ------- |
| 413 | utils.Index |
| 414 | The src nodes. |
| 415 | utils.Index |
| 416 | The dst nodes. |
| 417 | utils.Index |
| 418 | The edge ids. |
| 419 | """ |
| 420 | if len(v) == 1: |
| 421 | edge_array = _CAPI_DGLGraphInEdges_1(self, int(v[0])) |
| 422 | else: |
| 423 | v_array = v.todgltensor() |
| 424 | edge_array = _CAPI_DGLGraphInEdges_2(self, v_array) |
| 425 | src = utils.toindex(edge_array(0)) |
| 426 | dst = utils.toindex(edge_array(1)) |
| 427 | eid = utils.toindex(edge_array(2)) |
| 428 | return src, dst, eid |
| 429 | |
| 430 | def out_edges(self, v): |
| 431 | """Return the out edges of the node(s). |
nothing calls this directly
no test coverage detected