Skip to content
This repository has been archived by the owner on Apr 9, 2024. It is now read-only.

Add topological iterator to Graph class #100

Open
LvanArkel opened this issue Jun 2, 2023 · 1 comment
Open

Add topological iterator to Graph class #100

LvanArkel opened this issue Jun 2, 2023 · 1 comment

Comments

@LvanArkel
Copy link

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.

@kamirr
Copy link
Contributor

kamirr commented Jun 4, 2023

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants