-
Notifications
You must be signed in to change notification settings - Fork 156
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add token swapper to rustworkx-core (#765)
* Add token swapper * Finish add_token_edges setup rand * Finish main fn * Add swap fn * Add find_cycle and start trial_map * Finish good compile code * First testing * Rebuild swapper using struct and impl * Restructure around struct and token_swapper * Fix find_cycle and passing copies * First test success and cleanup * More testing and simplify di and sub_di graph * Finish tests * Format * Lint * Add python interface * Fix limit calc * Fix pyo3 signature * One more time * pyo3 fix * Fix signature 2 * Add python tests * Cleanup and reno * Fix conflict * Use connectivity::find_cycle * Review updates * Switch to map * Convert trial_map to parallel * Fix seed changes * Cleanup and comments * Name changes * Finish docs and add threshold * Fix stable graph removed nodes and error msgs --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
- Loading branch information
1 parent
8786c41
commit 7ed0f1f
Showing
9 changed files
with
811 additions
and
0 deletions.
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.