-
Notifications
You must be signed in to change notification settings - Fork 150
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
Push generators into rustworkx-core #751
Comments
I think this is a good idea, having the generators be part of the rustworkx-core makes a lot of sense, I think your sketch of how to go about separating out a generic rust part from the python specific version makes sense. I am wondering if we can go a step further making it generic with |
This commit migrates the cycle-graph generator to rustworkx-core. It makes the function generic so that it can be used with any petgraph graph that's buildable and node indexable. This is primarily to serve as a pattern for migrating all the generator functions we currently have to rustworkx-core. This pattern should be usable for any generator function we have. Part of Qiskit#751
I pushed up #758 to prototype how to make the generator functions generic in rustworkx-core (using |
This commit migrates the cycle-graph generator to rustworkx-core. It makes the function generic so that it can be used with any petgraph graph that's buildable and node indexable. This is primarily to serve as a pattern for migrating all the generator functions we currently have to rustworkx-core. This pattern should be usable for any generator function we have. Part of Qiskit#751
* Move cycle_graph generator to rustworkx-core This commit migrates the cycle-graph generator to rustworkx-core. It makes the function generic so that it can be used with any petgraph graph that's buildable and node indexable. This is primarily to serve as a pattern for migrating all the generator functions we currently have to rustworkx-core. This pattern should be usable for any generator function we have. Part of #751 * Apply suggestions from code review Co-authored-by: Ivan Carvalho <8753214+IvanIsCoding@users.noreply.github.com> * Run cargo fmt Co-authored-by: Ivan Carvalho <8753214+IvanIsCoding@users.noreply.github.com>
@enavarro51 is there anything left for this or can we close this as complete now? |
All the ones that were in the original |
Ok,then im going to close this as complete, thanks |
What is the expected enhancement?
I have a use case where I want to create graphs from Rust code, in the same way that
networkx
/rustworkx
allows one to create graphs from Python. Unfortunatelyrustworkx
contains the graph generators, rather thanrustworkx_core
, so the existing generators are not accessible to me.I would like to see the generators abstracted of any Python-specific logic and moved into
rustworkx_core
.Some quick prototyping showed something like this could work (obviously would need to think further about error handling):
Alternatively I can re-implement these generators in my own application directly on top of
petgraph
, but that seems less than ideal.The text was updated successfully, but these errors were encountered: