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

Move ancestors and descendants to rustworkx-core #1208

Merged
merged 2 commits into from
Jun 1, 2024

Conversation

mtreinish
Copy link
Member

This commit adds an implementation of the ancestors and descendants functions to the rustworkx-core crate exposing the functions to rust users. The existing implementation in the rustworkx crate is removed and it is updated to call the rustworkx-core functions. These new functions will be more efficient as they're not using dijkstra's algorithm to find a path from nodes now and instead are just doing a BFS. The rustwork-core functions also return an iterator of nodes.

This commit adds an implementation of the ancestors and descendants
functions to the rustworkx-core crate exposing the functions to rust
users. The existing implementation in the rustworkx crate is removed and
it is updated to call the rustworkx-core functions. These new functions
will be more efficient as they're not using dijkstra's algorithm to find
a path from nodes now and instead are just doing a BFS. The
rustwork-core functions also return an iterator of nodes.
Copy link
Collaborator

@IvanIsCoding IvanIsCoding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, this seems pretty straightforward

@IvanIsCoding IvanIsCoding added the automerge Queue a approved PR for merging label Jun 1, 2024
@coveralls
Copy link

coveralls commented Jun 1, 2024

Pull Request Test Coverage Report for Build 9331462460

Details

  • 30 of 30 (100.0%) changed or added relevant lines in 2 files are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.008%) to 95.86%

Files with Coverage Reduction New Missed Lines %
rustworkx-core/src/generators/random_graph.rs 2 85.03%
Totals Coverage Status
Change from base Build 9331316840: -0.008%
Covered Lines: 17318
Relevant Lines: 18066

💛 - Coveralls

@mtreinish mtreinish merged commit 4327583 into Qiskit:main Jun 1, 2024
28 of 30 checks passed
@mtreinish mtreinish deleted the ancestry-is-not-our-sponsor branch June 1, 2024 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Queue a approved PR for merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants