Skip to content

Commit

Permalink
Reorganize API docs into subpages (#927) (#943)
Browse files Browse the repository at this point in the history
* Reorganize API docs into subfolders

* Increase maxdepth for functions page

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
Eric-Arellano and mergify[bot] committed Jul 25, 2023
1 parent f874efc commit 4200d67
Show file tree
Hide file tree
Showing 26 changed files with 462 additions and 450 deletions.
449 changes: 0 additions & 449 deletions docs/source/api.rst

This file was deleted.

13 changes: 13 additions & 0 deletions docs/source/api/algorithm_functions/centrality.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.. _centrality:

Centrality
==========

.. autosummary::
:toctree: ../../apiref

rustworkx.betweenness_centrality
rustworkx.edge_betweenness_centrality
rustworkx.eigenvector_centrality
rustworkx.katz_centrality
rustworkx.closeness_centrality
26 changes: 26 additions & 0 deletions docs/source/api/algorithm_functions/connectivity_and_cycles.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
.. _connectivity-cycle-finding:

Connectivity and Cycles
=======================

.. autosummary::
:toctree: ../../apiref

rustworkx.number_connected_components
rustworkx.connected_components
rustworkx.node_connected_component
rustworkx.is_connected
rustworkx.strongly_connected_components
rustworkx.number_weakly_connected_components
rustworkx.weakly_connected_components
rustworkx.is_weakly_connected
rustworkx.cycle_basis
rustworkx.simple_cycles
rustworkx.digraph_find_cycle
rustworkx.articulation_points
rustworkx.biconnected_components
rustworkx.chain_decomposition
rustworkx.all_simple_paths
rustworkx.all_pairs_all_simple_paths
rustworkx.stoer_wagner_min_cut
rustworkx.longest_simple_path
14 changes: 14 additions & 0 deletions docs/source/api/algorithm_functions/dag_algorithms.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.. _dag-algorithms:

DAG Algorithms
==============

.. autosummary::
:toctree: ../../apiref

rustworkx.dag_longest_path
rustworkx.dag_longest_path_length
rustworkx.dag_weighted_longest_path
rustworkx.dag_weighted_longest_path_length
rustworkx.is_directed_acyclic_graph
rustworkx.layers
11 changes: 11 additions & 0 deletions docs/source/api/algorithm_functions/graph_operations.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.. _graph-ops:

Graph Operations
================

.. autosummary::
:toctree: ../../apiref

rustworkx.complement
rustworkx.union
rustworkx.cartesian_product
19 changes: 19 additions & 0 deletions docs/source/api/algorithm_functions/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
.. _algorithm_api:

Algorithm Functions
===================

.. toctree::
:maxdepth: 2

centrality
connectivity_and_cycles
dag_algorithms
graph_operations
isomorphism
link_analysis
matching
other
shortest_paths
traversal
tree
12 changes: 12 additions & 0 deletions docs/source/api/algorithm_functions/isomorphism.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.. _isomorphism:

Isomorphism
===========

.. autosummary::
:toctree: ../../apiref

rustworkx.is_isomorphic
rustworkx.is_subgraph_isomorphic
rustworkx.is_isomorphic_node_match
rustworkx.vf2_mapping
10 changes: 10 additions & 0 deletions docs/source/api/algorithm_functions/link_analysis.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. _link-analysis:

Link Analysis
=============

.. autosummary::
:toctree: ../../apiref

rustworkx.pagerank
rustworkx.hits
11 changes: 11 additions & 0 deletions docs/source/api/algorithm_functions/matching.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.. _matching:

Matching
========

.. autosummary::
:toctree: ../../apiref

rustworkx.max_weight_matching
rustworkx.is_matching
rustworkx.is_maximal_matching
14 changes: 14 additions & 0 deletions docs/source/api/algorithm_functions/other.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.. _other-algorithms:

Other Algorithm Functions
=========================

.. autosummary::
:toctree: ../../apiref

rustworkx.adjacency_matrix
rustworkx.transitivity
rustworkx.core_number
rustworkx.graph_greedy_color
rustworkx.metric_closure
rustworkx.is_planar
25 changes: 25 additions & 0 deletions docs/source/api/algorithm_functions/shortest_paths.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
.. _shortest-paths:

Shortest Paths
==============

.. autosummary::
:toctree: ../../apiref

rustworkx.dijkstra_shortest_paths
rustworkx.dijkstra_shortest_path_lengths
rustworkx.all_pairs_dijkstra_shortest_paths
rustworkx.all_pairs_dijkstra_path_lengths
rustworkx.bellman_ford_shortest_paths
rustworkx.bellman_ford_shortest_path_lengths
rustworkx.all_pairs_bellman_ford_shortest_paths
rustworkx.all_pairs_bellman_ford_path_lengths
rustworkx.negative_edge_cycle
rustworkx.find_negative_cycle
rustworkx.distance_matrix
rustworkx.floyd_warshall
rustworkx.floyd_warshall_numpy
rustworkx.astar_shortest_path
rustworkx.k_shortest_path_lengths
rustworkx.num_shortest_paths_unweighted
rustworkx.unweighted_average_shortest_path_length
24 changes: 24 additions & 0 deletions docs/source/api/algorithm_functions/traversal.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
.. _traversal:

Traversal
=========

.. autosummary::
:toctree: ../../apiref

rustworkx.dfs_edges
rustworkx.dfs_search
rustworkx.bfs_successors
rustworkx.bfs_predecessors
rustworkx.bfs_search
rustworkx.dijkstra_search
rustworkx.topological_sort
rustworkx.lexicographical_topological_sort
rustworkx.descendants
rustworkx.ancestors
rustworkx.collect_runs
rustworkx.collect_bicolor_runs
rustworkx.visit.DFSVisitor
rustworkx.visit.BFSVisitor
rustworkx.visit.DijkstraVisitor
rustworkx.TopologicalSorter
11 changes: 11 additions & 0 deletions docs/source/api/algorithm_functions/tree.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.. _tree:

Tree
====

.. autosummary::
:toctree: ../../apiref

rustworkx.minimum_spanning_edges
rustworkx.minimum_spanning_tree
rustworkx.steiner_tree
9 changes: 9 additions & 0 deletions docs/source/api/converters.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.. _converters:

Converters
==========

.. autosummary::
:toctree: ../apiref

rustworkx.networkx_converter
24 changes: 24 additions & 0 deletions docs/source/api/custom_return_types.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Custom Return Types
===================

.. autosummary::
:toctree: ../apiref

rustworkx.BFSSuccessors
rustworkx.BFSPredecessors
rustworkx.NodeIndices
rustworkx.EdgeIndices
rustworkx.EdgeList
rustworkx.WeightedEdgeList
rustworkx.EdgeIndexMap
rustworkx.PathMapping
rustworkx.PathLengthMapping
rustworkx.Pos2DMapping
rustworkx.AllPairsPathMapping
rustworkx.AllPairsPathLengthMapping
rustworkx.CentralityMapping
rustworkx.EdgeCentralityMapping
rustworkx.Chains
rustworkx.NodeMap
rustworkx.ProductNodeMap
rustworkx.BiconnectedComponents
17 changes: 17 additions & 0 deletions docs/source/api/exceptions.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Exceptions
==========

.. autosummary::
:toctree: ../apiref

rustworkx.InvalidNode
rustworkx.DAGWouldCycle
rustworkx.NoEdgeBetweenNodes
rustworkx.DAGHasCycle
rustworkx.NegativeCycle
rustworkx.NoSuitableNeighbors
rustworkx.NoPathFound
rustworkx.NullGraph
rustworkx.visit.StopSearch
rustworkx.visit.PruneSearch
rustworkx.JSONSerializationError
34 changes: 34 additions & 0 deletions docs/source/api/generators.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
.. _generator_funcs:

Generators
==========

.. autosummary::
:toctree: ../apiref

rustworkx.generators.cycle_graph
rustworkx.generators.directed_cycle_graph
rustworkx.generators.path_graph
rustworkx.generators.directed_path_graph
rustworkx.generators.star_graph
rustworkx.generators.directed_star_graph
rustworkx.generators.mesh_graph
rustworkx.generators.directed_mesh_graph
rustworkx.generators.grid_graph
rustworkx.generators.directed_grid_graph
rustworkx.generators.binomial_tree_graph
rustworkx.generators.directed_binomial_tree_graph
rustworkx.generators.hexagonal_lattice_graph
rustworkx.generators.directed_hexagonal_lattice_graph
rustworkx.generators.heavy_square_graph
rustworkx.generators.directed_heavy_square_graph
rustworkx.generators.heavy_hex_graph
rustworkx.generators.directed_heavy_hex_graph
rustworkx.generators.lollipop_graph
rustworkx.generators.generalized_petersen_graph
rustworkx.generators.barbell_graph
rustworkx.generators.full_rary_tree
rustworkx.generators.empty_graph
rustworkx.generators.directed_empty_graph
rustworkx.generators.complete_graph
rustworkx.generators.directed_complete_graph
9 changes: 9 additions & 0 deletions docs/source/api/graph_classes.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Graph Classes
=============

.. autosummary::
:toctree: ../apiref

rustworkx.PyGraph
rustworkx.PyDiGraph
rustworkx.PyDAG
23 changes: 23 additions & 0 deletions docs/source/api/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
.. _rustworkx:

Rustworkx API Reference
=======================

.. toctree::
:maxdepth: 2

graph_classes
algorithm_functions/index

.. toctree::
:maxdepth: 1

generators
random_graph_generator_functions
layout_functions
serialization
converters
pydigraph_api_functions
pygraph_api_functions
exceptions
custom_return_types
14 changes: 14 additions & 0 deletions docs/source/api/layout_functions.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.. _layout-functions:

Layout Functions
================

.. autosummary::
:toctree: ../apiref

rustworkx.random_layout
rustworkx.spring_layout
rustworkx.bipartite_layout
rustworkx.circular_layout
rustworkx.shell_layout
rustworkx.spiral_layout
58 changes: 58 additions & 0 deletions docs/source/api/pydigraph_api_functions.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
.. _api-functions-pydigraph:

API functions for PyDigraph
===========================

These functions are algorithm functions that are type specific for
:class:`~rustworkx.PyDiGraph` or :class:`~rustworkx.PyDAG` objects. Universal
functions from Retworkx API that work for both graph types internally call
the functions from the explicitly typed based on the data type.

.. autosummary::
:toctree: ../apiref

rustworkx.digraph_is_isomorphic
rustworkx.digraph_is_subgraph_isomorphic
rustworkx.digraph_vf2_mapping
rustworkx.digraph_distance_matrix
rustworkx.digraph_floyd_warshall
rustworkx.digraph_floyd_warshall_numpy
rustworkx.digraph_adjacency_matrix
rustworkx.digraph_all_simple_paths
rustworkx.digraph_all_pairs_all_simple_paths
rustworkx.digraph_astar_shortest_path
rustworkx.digraph_dijkstra_shortest_paths
rustworkx.digraph_all_pairs_dijkstra_shortest_paths
rustworkx.digraph_dijkstra_shortest_path_lengths
rustworkx.digraph_all_pairs_dijkstra_path_lengths
rustworkx.digraph_bellman_ford_shortest_path_lengths
rustworkx.digraph_bellman_ford_shortest_path_lengths
rustworkx.digraph_all_pairs_bellman_ford_shortest_paths
rustworkx.digraph_all_pairs_bellman_ford_path_lengths
rustworkx.digraph_k_shortest_path_lengths
rustworkx.digraph_dfs_edges
rustworkx.digraph_dfs_search
rustworkx.digraph_find_cycle
rustworkx.digraph_transitivity
rustworkx.digraph_core_number
rustworkx.digraph_complement
rustworkx.digraph_union
rustworkx.digraph_tensor_product
rustworkx.digraph_cartesian_product
rustworkx.digraph_random_layout
rustworkx.digraph_bipartite_layout
rustworkx.digraph_circular_layout
rustworkx.digraph_shell_layout
rustworkx.digraph_spiral_layout
rustworkx.digraph_spring_layout
rustworkx.digraph_num_shortest_paths_unweighted
rustworkx.digraph_betweenness_centrality
rustworkx.digraph_edge_betweenness_centrality
rustworkx.digraph_closeness_centrality
rustworkx.digraph_eigenvector_centrality
rustworkx.digraph_katz_centrality
rustworkx.digraph_unweighted_average_shortest_path_length
rustworkx.digraph_bfs_search
rustworkx.digraph_dijkstra_search
rustworkx.digraph_node_link_json
rustworkx.digraph_longest_simple_path
Loading

0 comments on commit 4200d67

Please sign in to comment.