MCPcopy Index your code
hub / github.com/waleedka/hiddenlayer / outgoing

Method outgoing

hiddenlayer/graph.py:219–226  ·  view source on GitHub ↗

Returns nodes connecting out of the given node (or list of nodes).

(self, node)

Source from the content-addressed store, hash-verified

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)."""

Callers 7

siblingsMethod · 0.95
replaceMethod · 0.95
test_directed_graphMethod · 0.95
test_parallel_foldMethod · 0.95
test_pruneMethod · 0.95
tagMethod · 0.80
matchMethod · 0.80

Calls 1

idMethod · 0.95

Tested by 3

test_directed_graphMethod · 0.76
test_parallel_foldMethod · 0.76
test_pruneMethod · 0.76