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

Method incoming

hiddenlayer/graph.py:228–235  ·  view source on GitHub ↗

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

(self, node)

Source from the content-addressed store, hash-verified

226 return outgoing
227
228 def incoming(self, node):
229 """Returns nodes connecting to the given node (or list of nodes)."""
230 nodes = node if isinstance(node, list) else [node]
231 node_ids = [self.id(n) for n in nodes]
232 # Find edges incoming to this group but not outgoing from it
233 incoming = [self[e[0]] for e in self.edges
234 if e[1] in node_ids and e[0] not in node_ids]
235 return incoming
236
237 def siblings(self, node):
238 """Returns all nodes that share the same parent (incoming node) with

Callers 6

siblingsMethod · 0.95
replaceMethod · 0.95
test_directed_graphMethod · 0.95
test_foldMethod · 0.95
tagMethod · 0.80
matchMethod · 0.80

Calls 1

idMethod · 0.95

Tested by 2

test_directed_graphMethod · 0.76
test_foldMethod · 0.76