-
Notifications
You must be signed in to change notification settings - Fork 156
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
Add token swapper to rustworkx-core #765
Merged
Merged
Changes from 49 commits
Commits
Show all changes
50 commits
Select commit
Hold shift + click to select a range
052cdc4
Add token swapper
enavarro51 90f49e8
Finish add_token_edges setup rand
enavarro51 1f66b47
Finish main fn
enavarro51 bd7a9a3
Add swap fn
enavarro51 ea5b0da
Add find_cycle and start trial_map
enavarro51 223e94e
Finish good compile code
enavarro51 3f32358
Merge conflict
enavarro51 6e22ade
First testing
enavarro51 1e9c2da
Rebuild swapper using struct and impl
enavarro51 fedaa3f
Restructure around struct and token_swapper
enavarro51 cad5c38
Fix find_cycle and passing copies
enavarro51 229bfa5
First test success and cleanup
enavarro51 832f506
More testing and simplify di and sub_di graph
enavarro51 f804026
Finish tests
enavarro51 0f3f8e3
Format
enavarro51 9797e20
Lint
enavarro51 6ee863f
Add python interface
enavarro51 8ed61ac
Merge branch 'main' into token_swapper
enavarro51 7b27ab2
Fix limit calc
enavarro51 bd00d6d
Merge branch 'main' into token_swapper
enavarro51 19a7e60
Merge main
enavarro51 162d71e
Fix pyo3 signature
enavarro51 f050aee
One more time
enavarro51 779da9f
pyo3 fix
enavarro51 3632e8e
Fix signature 2
enavarro51 96b9b8c
Add python tests
enavarro51 5fe53de
Cleanup and reno
enavarro51 2f64365
Merge branch 'main' into token_swapper
enavarro51 2a0815b
Fix conflict
enavarro51 fec8c60
Merge main
enavarro51 801ffb1
Use connectivity::find_cycle
enavarro51 a668106
Merge branch 'main' into token_swapper
enavarro51 2d74c45
Review updates
enavarro51 40d2a88
Merge branch 'token_swapper' of github.com:enavarro51/rustworkx into …
enavarro51 3cb32bf
Merge branch 'main' into token_swapper
enavarro51 1a10e4b
Switch to map
enavarro51 4992233
Merge branch 'main' into token_swapper
enavarro51 97d3ff2
Merge branch 'token_swapper' of github.com:enavarro51/rustworkx into …
enavarro51 83ccd8c
Convert trial_map to parallel
enavarro51 ae1a971
Merge branch 'main' into token_swapper
enavarro51 805be9c
Fix seed changes
enavarro51 402e226
Cleanup and comments
enavarro51 87b377a
Name changes
enavarro51 7a7ae3b
Finish docs and add threshold
enavarro51 36750f8
Merge branch 'main' into token_swapper
enavarro51 3e7ee22
Merge branch 'main' into token_swapper
enavarro51 0a56fd8
Fix stable graph removed nodes and error msgs
enavarro51 a2855d3
Merge branch 'token_swapper' of github.com:enavarro51/rustworkx into …
enavarro51 8171f03
Merge branch 'main' into token_swapper
enavarro51 da1d7cc
Merge branch 'main' into token_swapper
mergify[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
features: | ||
- | | ||
Added a new function, :func:`~.token_swapper()` which performs an | ||
approximately optimal Token Swapping algorithm and supports partial | ||
mappings (i.e. not-permutations) for graphs with missing tokens. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we don't have a
digraph_token_swapper
I'm wondering if there is a better section for this. But we can just do this in a followup, it's not critical.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I vote for let it be for now.