Skip to content

Commit

Permalink
Move collect_bicolor_runs() to rustworkx-core (#1186)
Browse files Browse the repository at this point in the history
* Attempt with graph.node_weight

* Progress until hitting  error.

* Return node ids instead of node weights. Code compiles!!!

* Move collect_bicolor_runs.rs to rustworkx-core/src/dag_algo.rs

* Add pyo3 wrapper for core collect_bicolor_runs, modify test, small fixes.

* Fix DagHasCycle error to match previous type

* Clean up unused parameters and functions, simplify error handling, add unit tests and reno.

* Use PyResult, fix comments

* Apply feedback from Matt's review, make tests make more sense.

* Add suggestion from Matt's code review

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>

* Remove stray print

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>

* Change callbacks to take ids instead of weights, rename some variables in tests for clarity.

* Fix test

* Apply suggestions from  code review

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>

* Get rid of unused trait

* Fix fmt

---------

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
  • Loading branch information
ElePT and mtreinish committed Jun 10, 2024
1 parent 2ad86a4 commit c7a7d53
Show file tree
Hide file tree
Showing 5 changed files with 423 additions and 107 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
features:
- |
Added a new function ``collect_bicolor_runs`` to rustworkx-core's ``dag_algo`` module.
Previously, the ``collect_bicolor_runs`` functionality for DAGs was only exposed
via the Python interface. Now Rust users can take advantage of this functionality in ``rustworkx-core``.
Loading

0 comments on commit c7a7d53

Please sign in to comment.