Open LvanArkel opened 1 year ago
You can use an existing solution for topological sorting, such as topological-sort
.
I don’t think egui_node_graph
can do much better than this, honestly.
edit: also, this crate allows for loops (although not without intermediate nodes), which means the such iterator can't be implemented in the general case.
Iterating through all nodes in a graph does currently not ensure that all inputs of a node have been generated. To simplify the generation of all values in a graph, an iterator that provides a topological ordering could be created.