Skip to content

Add distance_matrix to rustworkx-core #1439

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

mtreinish
Copy link
Member

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.

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.
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>
@mtreinish mtreinish changed the title [WIP] Add distance_matrix to rustworkx-core Add distance_matrix to rustworkx-core Jul 2, 2025
@mtreinish mtreinish changed the title Add distance_matrix to rustworkx-core [WIP] Add distance_matrix to rustworkx-core Jul 2, 2025
@mtreinish mtreinish changed the title [WIP] Add distance_matrix to rustworkx-core Add distance_matrix to rustworkx-core Jul 2, 2025
@mtreinish mtreinish removed the on hold label Jul 2, 2025
@coveralls
Copy link

Pull Request Test Coverage Report for Build 16036508074

Details

  • 75 of 75 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.003%) to 94.622%

Totals Coverage Status
Change from base Build 16007656987: 0.003%
Covered Lines: 17770
Relevant Lines: 18780

💛 - Coveralls

@IvanIsCoding IvanIsCoding modified the milestones: 0.17.0, 0.17.1 Jul 6, 2025
@mtreinish
Copy link
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.

@IvanIsCoding
Copy link
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

@IvanIsCoding IvanIsCoding modified the milestones: 0.17.1, 0.18.0 Jul 7, 2025
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