Add distance_matrix to rustworkx-core#1439
Merged
Merged
Conversation
This commit moves the distance matrix functionality to rustworkx. This is mostly a straightforward migration as the functionality was written in a generic way already. The only difference is how node holes were handled, the this opted to split the functions into 2, a verison that assumes the graph has compact indices and one that doesn't.
12 tasks
This commit performs some optimizations on the internals of the distance_matrix() function. It avoids extra allocations and uses a fixedbitset for tracking instead of hashsets. Co-authored-by: Jake Lishman <jake@binhbar.com>
Pull Request Test Coverage Report for Build 16924127179Details
💛 - Coveralls |
Member
Author
|
@IvanIsCoding Since this is a new feature from a semver perspective I don't think we should include this in a 0.17.1 release. I'd either keep it for 0.17.0 (it is ready for review now) or defer it to 0.18.0. |
Collaborator
|
Let’s defer it to 0.18.0 then. I tagged it as 0.17.1 because for rustworkx it would not be a change. But for rustworkx-core it is I guess |
Collaborator
|
I might merge #1491 and use this PR as an excuse to release 0.17.1. There was a problem releasing 0.17.0 with the identifiers. |
IvanIsCoding
approved these changes
Aug 13, 2025
IvanIsCoding
left a comment
Collaborator
There was a problem hiding this comment.
This seems straightforward. Maybe we should have merged it for 0.17.0, so I will use it to publish 0.17.1 as 0.17.0 only got published to crates.io
Collaborator
|
@Mergifyio backport stable/0.17 |
Contributor
✅ Backports have been createdDetails
|
mergify Bot
pushed a commit
that referenced
this pull request
Aug 13, 2025
* Add distance_matrix to rustworkx-core This commit moves the distance matrix functionality to rustworkx. This is mostly a straightforward migration as the functionality was written in a generic way already. The only difference is how node holes were handled, the this opted to split the functions into 2, a verison that assumes the graph has compact indices and one that doesn't. * Optimize the implementation of distance matrix This commit performs some optimizations on the internals of the distance_matrix() function. It avoids extra allocations and uses a fixedbitset for tracking instead of hashsets. Co-authored-by: Jake Lishman <jake@binhbar.com> * Deduplicate functions * Add release note * Remove stray debug print * Remove invalid classifier and capitalize keywords * Bump release version to 0.17.1 --------- Co-authored-by: Jake Lishman <jake@binhbar.com> Co-authored-by: Ivan Carvalho <8753214+IvanIsCoding@users.noreply.github.com> Co-authored-by: Ivan Carvalho <ivancarvalho@gatech.edu> (cherry picked from commit 7318a80)
IvanIsCoding
added a commit
that referenced
this pull request
Aug 13, 2025
* Add distance_matrix to rustworkx-core This commit moves the distance matrix functionality to rustworkx. This is mostly a straightforward migration as the functionality was written in a generic way already. The only difference is how node holes were handled, the this opted to split the functions into 2, a verison that assumes the graph has compact indices and one that doesn't. * Optimize the implementation of distance matrix This commit performs some optimizations on the internals of the distance_matrix() function. It avoids extra allocations and uses a fixedbitset for tracking instead of hashsets. * Deduplicate functions * Add release note * Remove stray debug print * Remove invalid classifier and capitalize keywords * Bump release version to 0.17.1 --------- (cherry picked from commit 7318a80) Co-authored-by: Matthew Treinish <mtreinish@kortar.org> Co-authored-by: Jake Lishman <jake@binhbar.com> Co-authored-by: Ivan Carvalho <8753214+IvanIsCoding@users.noreply.github.com> Co-authored-by: Ivan Carvalho <ivancarvalho@gatech.edu>
github-merge-queue Bot
pushed a commit
that referenced
this pull request
Sep 16, 2025
* Add distance_matrix to rustworkx-core (#1439) (#1493) * Add distance_matrix to rustworkx-core This commit moves the distance matrix functionality to rustworkx. This is mostly a straightforward migration as the functionality was written in a generic way already. The only difference is how node holes were handled, the this opted to split the functions into 2, a verison that assumes the graph has compact indices and one that doesn't. * Optimize the implementation of distance matrix This commit performs some optimizations on the internals of the distance_matrix() function. It avoids extra allocations and uses a fixedbitset for tracking instead of hashsets. * Deduplicate functions * Add release note * Remove stray debug print * Remove invalid classifier and capitalize keywords * Bump release version to 0.17.1 --------- (cherry picked from commit 7318a80) Co-authored-by: Matthew Treinish <mtreinish@kortar.org> Co-authored-by: Jake Lishman <jake@binhbar.com> Co-authored-by: Ivan Carvalho <8753214+IvanIsCoding@users.noreply.github.com> Co-authored-by: Ivan Carvalho <ivancarvalho@gatech.edu> * Make workflow only trigger sdist steps * Tweak license field * Fix retworkx dist path * Limit trigger to today * Update timestamp condition in wheels.yml * Update build conditions for wheels on specific date * Revert to main status * Use build for wheels.yml * Fix newline --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: Matthew Treinish <mtreinish@kortar.org> Co-authored-by: Jake Lishman <jake@binhbar.com>
mergify Bot
added a commit
that referenced
this pull request
Sep 16, 2025
* Add distance_matrix to rustworkx-core (#1439) (#1493) * Add distance_matrix to rustworkx-core This commit moves the distance matrix functionality to rustworkx. This is mostly a straightforward migration as the functionality was written in a generic way already. The only difference is how node holes were handled, the this opted to split the functions into 2, a verison that assumes the graph has compact indices and one that doesn't. * Optimize the implementation of distance matrix This commit performs some optimizations on the internals of the distance_matrix() function. It avoids extra allocations and uses a fixedbitset for tracking instead of hashsets. * Deduplicate functions * Add release note * Remove stray debug print * Remove invalid classifier and capitalize keywords * Bump release version to 0.17.1 --------- (cherry picked from commit 7318a80) Co-authored-by: Matthew Treinish <mtreinish@kortar.org> Co-authored-by: Jake Lishman <jake@binhbar.com> Co-authored-by: Ivan Carvalho <8753214+IvanIsCoding@users.noreply.github.com> Co-authored-by: Ivan Carvalho <ivancarvalho@gatech.edu> * Make workflow only trigger sdist steps * Tweak license field * Fix retworkx dist path * Limit trigger to today * Update timestamp condition in wheels.yml * Update build conditions for wheels on specific date * Revert to main status * Use build for wheels.yml * Fix newline --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: Matthew Treinish <mtreinish@kortar.org> Co-authored-by: Jake Lishman <jake@binhbar.com> (cherry picked from commit 69af7ff)
IvanIsCoding
added a commit
that referenced
this pull request
Sep 16, 2025
* Add distance_matrix to rustworkx-core (#1439) (#1493) * Add distance_matrix to rustworkx-core This commit moves the distance matrix functionality to rustworkx. This is mostly a straightforward migration as the functionality was written in a generic way already. The only difference is how node holes were handled, the this opted to split the functions into 2, a verison that assumes the graph has compact indices and one that doesn't. * Optimize the implementation of distance matrix This commit performs some optimizations on the internals of the distance_matrix() function. It avoids extra allocations and uses a fixedbitset for tracking instead of hashsets. * Deduplicate functions * Add release note * Remove stray debug print * Remove invalid classifier and capitalize keywords * Bump release version to 0.17.1 --------- (cherry picked from commit 7318a80) * Make workflow only trigger sdist steps * Tweak license field * Fix retworkx dist path * Limit trigger to today * Update timestamp condition in wheels.yml * Update build conditions for wheels on specific date * Revert to main status * Use build for wheels.yml * Fix newline --------- (cherry picked from commit 69af7ff) Co-authored-by: Ivan Carvalho <8753214+IvanIsCoding@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: Matthew Treinish <mtreinish@kortar.org> Co-authored-by: Jake Lishman <jake@binhbar.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This commit moves the distance matrix functionality to rustworkx. This is mostly a straightforward migration as the functionality was written in a generic way already. The only difference is how node holes were handled, the this opted to split the functions into 2, a verison that assumes the graph has compact indices and one that doesn't.