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)
| 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. |
nothing calls this directly
no test coverage detected