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)
| 789 | return g |
| 790 | |
| 791 | def walk(self) -> Generator[Expr]: |
| 792 | """Iterate through all expressions in the tree |
| 793 | |
| 794 | Returns |
| 795 | ------- |
| 796 | nodes |
| 797 | Generator of Expr instances in the graph. |
| 798 | Ordering is a depth-first search of the expression tree |
| 799 | """ |
| 800 | stack = [self] |
| 801 | seen = set() |
| 802 | while stack: |
| 803 | node = stack.pop() |
| 804 | if node._name in seen: |
| 805 | continue |
| 806 | seen.add(node._name) |
| 807 | |
| 808 | for dep in node.dependencies(): |
| 809 | stack.append(dep) |
| 810 | |
| 811 | yield node |
| 812 | |
| 813 | def find_operations(self, operation: type | tuple[type]) -> Generator[Expr]: |
| 814 | """Search the expression graph for a specific operation type |
no test coverage detected