Skip to content
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

Add universal methods #241

Merged
merged 8 commits into from
Feb 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions docs/source/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ Random Circuit Functions
Algorithm Functions
-------------------

Specific Graph Type Methods
'''''''''''''''''''''''''''

.. autosummary::
:toctree: stubs

Expand Down Expand Up @@ -88,6 +91,27 @@ Algorithm Functions
retworkx.digraph_find_cycle
retworkx.digraph_union

Universal Functions
'''''''''''''''''''

These functions are algorithm functions that wrap per graph object
type functions in the algorithms API but can be run with a
:class:`~retworkx.PyGraph`, :class:`~retworkx.PyDiGraph`, or
:class:`~retworkx.PyDAG` object.

.. autosummary::
:toctree: stubs

retworkx.distance_matrix
retworkx.floyd_warshall_numpy
retworkx.adjacency_matrix
retworkx.all_simple_paths
retworkx.astar_shortest_path
retworkx.dijkstra_shortest_paths
retworkx.dijkstra_shortest_path_lengths
retworkx.k_shortest_path_lengths
retworkx.dfs_edges

Exceptions
----------

Expand Down
16 changes: 16 additions & 0 deletions releasenotes/notes/add-universal-functions-1e54351f1f7afa4b.yaml
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`
Loading