-
Notifications
You must be signed in to change notification settings - Fork 141
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add universal methods In the rust generated Python API we need to have fixed class inpurts to satisfy the traits used by the pyo3 macro generated FFI functions. This results in duplicate methods like digraph_dfs_edges and graph_dfs_edges with the same implementation just differing input types. To simplify the API for users this commit adds universal functions to the python side of the retworkx package to take in any retworkx graph object and dispatch to the proper function in the rust generated api that relies on strict input types. Fixes #215 * Add release notes * Cleanup docs for new functions * Add as_undirected flag to distance_matrix()
- Loading branch information
Showing
4 changed files
with
475 additions
and
0 deletions.
There are no files selected for viewing
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
16 changes: 16 additions & 0 deletions
16
releasenotes/notes/add-universal-functions-1e54351f1f7afa4b.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,16 @@ | ||
--- | ||
features: | ||
- | | ||
New universal functions that can take in a :class:`~retworkx.PyGraph` or | ||
:class:`~retworkx.PyDiGraph` instead of being class specific have been to | ||
the retworkx API. These new functions are: | ||
* :func:`retworkx.distance_matrix` | ||
* :func:`retworkx.floyd_warshall_numpy` | ||
* :func:`retworkx.adjacency_matrix` | ||
* :func:`retworkx.all_simple_paths` | ||
* :func:`retworkx.astar_shortest_path` | ||
* :func:`retworkx.dijkstra_shortest_paths` | ||
* :func:`retworkx.dijkstra_shortest_path_lengths` | ||
* :func:`retworkx.k_shortest_path_lengths` | ||
* :func:`retworkx.dfs_edges` |
Oops, something went wrong.