MCPcopy Create free account
hub / github.com/alibaba/GraphScope / reverse

Method reverse

python/graphscope/nx/classes/digraph.py:490–509  ·  view source on GitHub ↗
(self, copy=True)

Source from the content-addressed store, hash-verified

488 @clear_mutation_cache
489 @patch_docstring(RefDiGraph.reverse)
490 def reverse(self, copy=True):
491 self._convert_arrow_to_dynamic()
492
493 if not copy:
494 g = reverse_view(self)
495 g._op = self._op
496 g._key = self._key
497 g._schema = deepcopy(self._schema)
498 g._is_client_view = True
499 else:
500 g = self.__class__(create_empty_in_engine=False)
501 g.graph = self.graph
502 g.name = self.name
503 op = dag_utils.copy_graph(self, "reverse")
504 g._op = op
505 graph_def = op.eval(leaf=False)
506 g._key = graph_def.key
507 g.cache.warmup()
508 g._session = self._session
509 return g

Callers 15

test_reverse_copyMethod · 0.95
test_reverse_nocopyMethod · 0.95
test_reverse_hashableMethod · 0.95
setup_classMethod · 0.95
setup_classMethod · 0.95
setup_classMethod · 0.95
setup_methodMethod · 0.45
test_subclassMethod · 0.45
setup_classMethod · 0.45

Calls 4

reverse_viewFunction · 0.90
evalMethod · 0.45
warmupMethod · 0.45

Tested by 15

test_reverse_copyMethod · 0.76
test_reverse_nocopyMethod · 0.76
test_reverse_hashableMethod · 0.76
setup_classMethod · 0.76
setup_classMethod · 0.76
setup_classMethod · 0.76
setup_methodMethod · 0.36
test_subclassMethod · 0.36
setup_classMethod · 0.36
test_graph_chainMethod · 0.36