MCPcopy Index your code
hub / github.com/OpenPPL/ppq / process

Method process

ppq/IR/search.py:400–418  ·  view source on GitHub ↗
(self, command: GraphCommand)

Source from the content-addressed store, hash-verified

398 self._cache = {}
399
400 def process(self, command: GraphCommand) -> Any:
401 if isinstance(command, TraversalCommand):
402 if command.command_type == GraphCommandType.TRAVERSAL_PATTERN_MATCHING:
403 return self.path_matching(
404 sp_expr=command._sp_expr,
405 rp_expr=command._rp_expr,
406 ep_expr=command._ep_expr,
407 direction=command._direction)
408 else:
409 return self.opset_matching(
410 sp_expr=command._sp_expr,
411 rp_expr=command._rp_expr,
412 ep_expr=command._ep_expr,
413 direction=command._direction)
414 else:
415 raise TypeError(
416 'To execute a traversal-based pattern matching, a TraversalCommand is required here.\n'
417 'Initialize your own TraversalCommand instance for invoking '
418 'this function rather than using plain GraphCommand Please.')
419
420 def _acceptable_command_types(self) -> List[GraphCommandType]:
421 return [

Callers 1

collect_all_pairsMethod · 0.95

Calls 2

path_matchingMethod · 0.95
opset_matchingMethod · 0.95

Tested by

no test coverage detected