-
Notifications
You must be signed in to change notification settings - Fork 175
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
Hyperbolic generator improvements + fix #1212
Merged
Merged
Conversation
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
…kit#1195) In the recently merged Qiskit#1192 a new generic DAG longest_path function was added to rustworkx-core. However, the trait bounds on the function were a bit tighter than they needed to be. The traits were forcing NodeId to be of a NodeIndex type and this wasn't really required. The only requirement that the NodeId type can be put on a hashmap and do a partial compare (that implements Hash, Eq, and PartialOrd). Also the IntoNeighborsDirected wasn't required because it's methods weren't ever used. This commit loosens the traits bounds to facilitate this. At the same time this also simplifies the code structure a bit to reduce the separation of the rust code structure in the rustworkx crate using longest_path().
This commit migrates the .cargo/config file which has been deprecated to the new path .cargo/config.toml. This will fix warnings that are emitted when compiling with the latest stable release. This new path has been supported since Rust 1.38 which is much older than our current MSRV of 1.70.
IvanIsCoding
reviewed
Jun 8, 2024
@@ -0,0 +1,8 @@ | |||
fixes: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We never released the code so you don’t have to include release notes this time
IvanIsCoding
reviewed
Jun 8, 2024
IvanIsCoding
reviewed
Jun 8, 2024
Pull Request Test Coverage Report for Build 9425909095Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 9428509697Details
💛 - Coveralls |
IvanIsCoding
approved these changes
Jun 8, 2024
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.
The hyperbolic distance returned NaN for very close vertices. This meant the hyperbolic geometric graph generator wouldn't create edges that should exist.
I realized it didn't make sense to accept infinite coordinates (hyperbolic distance is undefined in most cases) and return an error instead.
I swapped the order of the parameters in the rustworkx-core api to match the rustworkx api.
Finally, it's inconvenient to specify the time coordinates since it can be computed using the other coordinates. Users only need to specify the useful coordinates.