MCPcopy
hub / github.com/waleedka/hiddenlayer / match

Method match

hiddenlayer/ge.py:95–104  ·  view source on GitHub ↗
(self, graph, node)

Source from the content-addressed store, hash-verified

93 self.condition = condition # TODO: not implemented yet
94
95 def match(self, graph, node):
96 if isinstance(node, list):
97 return [], None
98 if self.op == node.op:
99 following = graph.outgoing(node)
100 if len(following) == 1:
101 following = following[0]
102 return [node], following
103 else:
104 return [], None
105
106
107class SerialPattern():

Callers 7

applyMethod · 0.45
searchMethod · 0.45
reMethod · 0.45
matchMethod · 0.45
matchMethod · 0.45
get_shapeFunction · 0.45
test_basicsMethod · 0.45

Calls 1

outgoingMethod · 0.80

Tested by 1

test_basicsMethod · 0.36