Iterate through all expressions in the tree Returns ------- nodes Generator of Expr instances in the graph. Ordering is a depth-first search of the expression tree
(self)
| 799 | return g |
| 800 | |
| 801 | def walk(self) -> Generator[Expr]: |
| 802 | """Iterate through all expressions in the tree |
| 803 | |
| 804 | Returns |
| 805 | ------- |
| 806 | nodes |
| 807 | Generator of Expr instances in the graph. |
| 808 | Ordering is a depth-first search of the expression tree |
| 809 | """ |
| 810 | stack = [self] |
| 811 | seen = set() |
| 812 | while stack: |
| 813 | node = stack.pop() |
| 814 | if node._name in seen: |
| 815 | continue |
| 816 | seen.add(node._name) |
| 817 | |
| 818 | for dep in node.dependencies(): |
| 819 | stack.append(dep) |
| 820 | |
| 821 | yield node |
| 822 | |
| 823 | def find_operations(self, operation: type | tuple[type]) -> Generator[Expr]: |
| 824 | """Search the expression graph for a specific operation type |
no test coverage detected