forked from Qiskit/rustworkx
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move ancestors and descendants to rustworkx-core (Qiskit#1208)
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. Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
- Loading branch information
1 parent
c40b169
commit 4327583
Showing
3 changed files
with
159 additions
and
20 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
releasenotes/notes/ancestors-descendants-rustworkx-core-8c4aac3364c155bf.yaml
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,12 @@ | ||
--- | ||
features: | ||
- | | ||
Added a new function ``ancestors()`` to the | ||
``rustworkx_core::traversal`` module. That is a generic Rust implementation | ||
for the core rust library that provides the | ||
:func:`.ancestors` function to Rust users. | ||
- | | ||
Added a new function ``descendants()`` to the | ||
``rustworkx_core::traversal`` module. That is a generic Rust implementation | ||
for the core rust library that provides the | ||
:func:`.descendants` function to Rust users. |
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