Returns nodes connecting out of the given node (or list of nodes).
(self, node)
| 217 | self.edges.append((vid1, vid2, label)) |
| 218 | |
| 219 | def outgoing(self, node): |
| 220 | """Returns nodes connecting out of the given node (or list of nodes).""" |
| 221 | nodes = node if isinstance(node, list) else [node] |
| 222 | node_ids = [self.id(n) for n in nodes] |
| 223 | # Find edges outgoing from this group but not incoming to it |
| 224 | outgoing = [self[e[1]] for e in self.edges |
| 225 | if e[0] in node_ids and e[1] not in node_ids] |
| 226 | return outgoing |
| 227 | |
| 228 | def incoming(self, node): |
| 229 | """Returns nodes connecting to the given node (or list of nodes).""" |