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

Method match

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

Source from the content-addressed store, hash-verified

109 self.patterns = patterns
110
111 def match(self, graph, node):
112 all_matches = []
113 for i, p in enumerate(self.patterns):
114 matches, following = p.match(graph, node)
115 if not matches:
116 return [], None
117 all_matches.extend(matches)
118 if i < len(self.patterns) - 1:
119 node = following # Might be more than one node
120 return all_matches, following
121
122
123class ParallelPattern():

Callers 1

applyMethod · 0.95

Calls 1

matchMethod · 0.45

Tested by

no test coverage detected