Perform the topology sort operation on the graph. Notes: the `graph` can not contain a circle. Returns: list(IrNode): nodes in topology order.
(self)
| 5890 | return core.graph_num(self.graph) |
| 5891 | |
| 5892 | def topology_sort(self): |
| 5893 | """ |
| 5894 | Perform the topology sort operation on the graph. |
| 5895 | |
| 5896 | Notes: the `graph` can not contain a circle. |
| 5897 | |
| 5898 | Returns: |
| 5899 | list(IrNode): nodes in topology order. |
| 5900 | """ |
| 5901 | ordered_nodes = core.topology_sort(self.graph) |
| 5902 | return [IrNode(n) for n in ordered_nodes] |
| 5903 | |
| 5904 | def build_adjacency_list(self): |
| 5905 | """ |
no test coverage detected