Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preserve order of box IDs when substituting #39

Closed
epatters opened this issue Aug 23, 2019 · 1 comment · Fixed by #56
Closed

Preserve order of box IDs when substituting #39

epatters opened this issue Aug 23, 2019 · 1 comment · Fixed by #56
Assignees
Labels

Comments

@epatters
Copy link
Member

After a substituting a box with a wiring diagram (via substitute!), the new IDs of the boxes in the original diagram are undefined. In practice, they are determined by an implementation detail of LightGraphs. Instead, the order of the boxes should be preserved, meaning that if box i is replaced with a diagram with k boxes, the new boxes should have IDs i, ..., i+k-1.

This can be achieved in various ways, but ideally there would be some support for it in LightGraphs (see sbromberger/LightGraphs.jl#1246) and MetaGraphs.

@epatters
Copy link
Member Author

For future reference, the current recommended approach in LightGraphs is described here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
1 participant