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

Fix color_change, fusion, and match_ids #244

Merged
merged 12 commits into from
Jul 1, 2024

Conversation

boldar99
Copy link
Contributor

@boldar99 boldar99 commented Jun 27, 2024

Fix the color_change, fusion, and match_ids_parallel methods that were broken with incident multi-edges.

Changes:

  • incident_edges now iterates through all individual incident edges.
  • match_ids_parallel returns False if the degree of the given vertex is not 2. This stops the program from calling edge_type which is undefined for multi-edges.

Related to zxcalc/zxlive#256

@RazinShaikh
Copy link
Contributor

This only fixes colour change method in editor_actions.py but not the one in basicrules.py. I don't know why there are two implementations of colour change and why they are implemented differently. I tried to copy the implementation of editor_actions.py to basicrules.py and it seems to work.

@RazinShaikh
Copy link
Contributor

I have pushed the color_change fix for basicrules.py.

@RazinShaikh
Copy link
Contributor

I have now fixed spider fusion in rules.py. I don't think fusion or color_change is defined anywhere else. So this PR should be good to merge.

@RazinShaikh
Copy link
Contributor

ah self loops are still broken

@RazinShaikh
Copy link
Contributor

Fixed!

@jvdwetering
Copy link
Collaborator

After the merge conflict is solved, this can probably be merged.

@RazinShaikh
Copy link
Contributor

I have resolved the conflict but I need to check if that broke anything

@RazinShaikh
Copy link
Contributor

This can be merged now!

@jvdwetering jvdwetering merged commit 27990c1 into zxcalc:master Jul 1, 2024
3 checks passed
@RazinShaikh RazinShaikh deleted the fix-multigraph-rewrites branch July 1, 2024 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants