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