MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / _connect_nodes

Method _connect_nodes

tensorflow/python/autograph/pyct/cfg.py:309–322  ·  view source on GitHub ↗

Connects nodes to signify that control flows from first to second. Args: first: Union[Set[Node, ...], Node] second: Node

(self, first, second)

Source from the content-addressed store, hash-verified

307 self.cond_leaves = {}
308
309 def _connect_nodes(self, first, second):
310 """Connects nodes to signify that control flows from first to second.
311
312 Args:
313 first: Union[Set[Node, ...], Node]
314 second: Node
315 """
316 if isinstance(first, Node):
317 first.next.add(second)
318 second.prev.add(first)
319 self.forward_edges.add((first, second))
320 else:
321 for node in first:
322 self._connect_nodes(node, second)
323
324 def _add_new_node(self, ast_node):
325 """Grows the graph by adding a CFG node following the current leaves."""

Callers 3

_add_new_nodeMethod · 0.95
exit_loop_sectionMethod · 0.95

Calls 1

addMethod · 0.45

Tested by

no test coverage detected