From def6ad50c08db574f797260202e34a257a5ac449 Mon Sep 17 00:00:00 2001 From: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com> Date: Mon, 24 Jul 2023 14:38:30 -0600 Subject: [PATCH] Reorganize API docs into subpages (#927) * Reorganize API docs into subfolders * Increase maxdepth for functions page --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- docs/source/api.rst | 449 ------------------ .../api/algorithm_functions/centrality.rst | 13 + .../connectivity_and_cycles.rst | 26 + .../algorithm_functions/dag_algorithms.rst | 14 + .../algorithm_functions/graph_operations.rst | 11 + docs/source/api/algorithm_functions/index.rst | 19 + .../api/algorithm_functions/isomorphism.rst | 12 + .../api/algorithm_functions/link_analysis.rst | 10 + .../api/algorithm_functions/matching.rst | 11 + docs/source/api/algorithm_functions/other.rst | 14 + .../algorithm_functions/shortest_paths.rst | 25 + .../api/algorithm_functions/traversal.rst | 24 + docs/source/api/algorithm_functions/tree.rst | 11 + docs/source/api/converters.rst | 9 + docs/source/api/custom_return_types.rst | 24 + docs/source/api/exceptions.rst | 17 + docs/source/api/generators.rst | 34 ++ docs/source/api/graph_classes.rst | 9 + docs/source/api/index.rst | 23 + docs/source/api/layout_functions.rst | 14 + docs/source/api/pydigraph_api_functions.rst | 58 +++ docs/source/api/pygraph_api_functions.rst | 58 +++ .../api/random_graph_generator_functions.rst | 13 + docs/source/api/serialization.rst | 10 + docs/source/index.rst | 3 +- docs/source/install.rst | 1 + 26 files changed, 462 insertions(+), 450 deletions(-) delete mode 100644 docs/source/api.rst create mode 100644 docs/source/api/algorithm_functions/centrality.rst create mode 100644 docs/source/api/algorithm_functions/connectivity_and_cycles.rst create mode 100644 docs/source/api/algorithm_functions/dag_algorithms.rst create mode 100644 docs/source/api/algorithm_functions/graph_operations.rst create mode 100644 docs/source/api/algorithm_functions/index.rst create mode 100644 docs/source/api/algorithm_functions/isomorphism.rst create mode 100644 docs/source/api/algorithm_functions/link_analysis.rst create mode 100644 docs/source/api/algorithm_functions/matching.rst create mode 100644 docs/source/api/algorithm_functions/other.rst create mode 100644 docs/source/api/algorithm_functions/shortest_paths.rst create mode 100644 docs/source/api/algorithm_functions/traversal.rst create mode 100644 docs/source/api/algorithm_functions/tree.rst create mode 100644 docs/source/api/converters.rst create mode 100644 docs/source/api/custom_return_types.rst create mode 100644 docs/source/api/exceptions.rst create mode 100644 docs/source/api/generators.rst create mode 100644 docs/source/api/graph_classes.rst create mode 100644 docs/source/api/index.rst create mode 100644 docs/source/api/layout_functions.rst create mode 100644 docs/source/api/pydigraph_api_functions.rst create mode 100644 docs/source/api/pygraph_api_functions.rst create mode 100644 docs/source/api/random_graph_generator_functions.rst create mode 100644 docs/source/api/serialization.rst diff --git a/docs/source/api.rst b/docs/source/api.rst deleted file mode 100644 index 2eb378e5b..000000000 --- a/docs/source/api.rst +++ /dev/null @@ -1,449 +0,0 @@ -.. _rustworkx: - -####################### -Rustworkx API Reference -####################### - -Graph Classes -============= - -.. autosummary:: - :toctree: apiref - - rustworkx.PyGraph - rustworkx.PyDiGraph - rustworkx.PyDAG - -.. _algorithm_api: - -Algorithm Functions -=================== - -.. _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 - -.. _centrality: - -Centrality ----------- - -.. autosummary:: - :toctree: apiref - - rustworkx.betweenness_centrality - rustworkx.edge_betweenness_centrality - rustworkx.eigenvector_centrality - rustworkx.katz_centrality - rustworkx.closeness_centrality - -.. _link-analysis: - -Link Analysis --------------- - -.. autosummary:: - :toctree: apiref - - rustworkx.pagerank - rustworkx.hits - -.. _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 - -.. _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 - -.. _tree: - -Tree ----- - -.. autosummary:: - :toctree: apiref - - rustworkx.minimum_spanning_edges - rustworkx.minimum_spanning_tree - rustworkx.steiner_tree - -.. _isomorphism: - -Isomorphism ------------ - -.. autosummary:: - :toctree: apiref - - rustworkx.is_isomorphic - rustworkx.is_subgraph_isomorphic - rustworkx.is_isomorphic_node_match - rustworkx.vf2_mapping - -.. _matching: - -Matching --------- - -.. autosummary:: - :toctree: apiref - - rustworkx.max_weight_matching - rustworkx.is_matching - rustworkx.is_maximal_matching - -.. _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 - -.. _graph-ops: - -Graph Operations ----------------- - -.. autosummary:: - :toctree: apiref - - rustworkx.complement - rustworkx.union - rustworkx.cartesian_product - -.. _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 - -.. _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 - -.. _random_generators: - -Random Graph Generator Functions -================================ - -.. autosummary:: - :toctree: apiref - - rustworkx.directed_gnp_random_graph - rustworkx.undirected_gnp_random_graph - rustworkx.directed_gnm_random_graph - rustworkx.undirected_gnm_random_graph - rustworkx.random_geometric_graph - -.. _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 - - -.. _serialization: - -Serialization -============= - -.. autosummary:: - :toctree: apiref - - rustworkx.node_link_json - rustworkx.read_graphml - -.. _converters: - -Converters -========== - -.. autosummary:: - :toctree: apiref - - rustworkx.networkx_converter - -.. _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 - -.. _api-functions-pygraph: - -API functions for PyGraph -========================= - -These functions are algorithm functions that are type specific for -:class:`~rustworkx.PyGraph` objects. Universal functions from Rustworkx API that -work for both graph types internally call the functions from the explicitly -typed API based on the data type. - -.. autosummary:: - :toctree: apiref - - rustworkx.graph_is_isomorphic - rustworkx.graph_is_subgraph_isomorphic - rustworkx.graph_vf2_mapping - rustworkx.graph_distance_matrix - rustworkx.graph_floyd_warshall - rustworkx.graph_floyd_warshall_numpy - rustworkx.graph_adjacency_matrix - rustworkx.graph_all_simple_paths - rustworkx.graph_all_pairs_all_simple_paths - rustworkx.graph_astar_shortest_path - rustworkx.graph_dijkstra_shortest_paths - rustworkx.graph_dijkstra_shortest_path_lengths - rustworkx.graph_all_pairs_dijkstra_shortest_paths - rustworkx.graph_k_shortest_path_lengths - rustworkx.graph_all_pairs_dijkstra_path_lengths - rustworkx.graph_bellman_ford_shortest_path_lengths - rustworkx.graph_bellman_ford_shortest_path_lengths - rustworkx.graph_all_pairs_bellman_ford_shortest_paths - rustworkx.graph_all_pairs_bellman_ford_path_lengths - rustworkx.graph_dfs_edges - rustworkx.graph_dfs_search - rustworkx.graph_transitivity - rustworkx.graph_core_number - rustworkx.graph_complement - rustworkx.graph_union - rustworkx.graph_tensor_product - rustworkx.graph_token_swapper - rustworkx.graph_cartesian_product - rustworkx.graph_random_layout - rustworkx.graph_bipartite_layout - rustworkx.graph_circular_layout - rustworkx.graph_shell_layout - rustworkx.graph_spiral_layout - rustworkx.graph_spring_layout - rustworkx.graph_num_shortest_paths_unweighted - rustworkx.graph_betweenness_centrality - rustworkx.graph_edge_betweenness_centrality - rustworkx.graph_closeness_centrality - rustworkx.graph_eigenvector_centrality - rustworkx.graph_katz_centrality - rustworkx.graph_unweighted_average_shortest_path_length - rustworkx.graph_bfs_search - rustworkx.graph_dijkstra_search - rustworkx.graph_node_link_json - rustworkx.graph_longest_simple_path - -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 - -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 diff --git a/docs/source/api/algorithm_functions/centrality.rst b/docs/source/api/algorithm_functions/centrality.rst new file mode 100644 index 000000000..78b54514e --- /dev/null +++ b/docs/source/api/algorithm_functions/centrality.rst @@ -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 diff --git a/docs/source/api/algorithm_functions/connectivity_and_cycles.rst b/docs/source/api/algorithm_functions/connectivity_and_cycles.rst new file mode 100644 index 000000000..b4f08f5ad --- /dev/null +++ b/docs/source/api/algorithm_functions/connectivity_and_cycles.rst @@ -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 diff --git a/docs/source/api/algorithm_functions/dag_algorithms.rst b/docs/source/api/algorithm_functions/dag_algorithms.rst new file mode 100644 index 000000000..6458452f7 --- /dev/null +++ b/docs/source/api/algorithm_functions/dag_algorithms.rst @@ -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 diff --git a/docs/source/api/algorithm_functions/graph_operations.rst b/docs/source/api/algorithm_functions/graph_operations.rst new file mode 100644 index 000000000..5daf333cd --- /dev/null +++ b/docs/source/api/algorithm_functions/graph_operations.rst @@ -0,0 +1,11 @@ +.. _graph-ops: + +Graph Operations +================ + +.. autosummary:: + :toctree: ../../apiref + + rustworkx.complement + rustworkx.union + rustworkx.cartesian_product diff --git a/docs/source/api/algorithm_functions/index.rst b/docs/source/api/algorithm_functions/index.rst new file mode 100644 index 000000000..849f4cb85 --- /dev/null +++ b/docs/source/api/algorithm_functions/index.rst @@ -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 diff --git a/docs/source/api/algorithm_functions/isomorphism.rst b/docs/source/api/algorithm_functions/isomorphism.rst new file mode 100644 index 000000000..ca586e7c6 --- /dev/null +++ b/docs/source/api/algorithm_functions/isomorphism.rst @@ -0,0 +1,12 @@ +.. _isomorphism: + +Isomorphism +=========== + +.. autosummary:: + :toctree: ../../apiref + + rustworkx.is_isomorphic + rustworkx.is_subgraph_isomorphic + rustworkx.is_isomorphic_node_match + rustworkx.vf2_mapping diff --git a/docs/source/api/algorithm_functions/link_analysis.rst b/docs/source/api/algorithm_functions/link_analysis.rst new file mode 100644 index 000000000..d6c3cc9ee --- /dev/null +++ b/docs/source/api/algorithm_functions/link_analysis.rst @@ -0,0 +1,10 @@ +.. _link-analysis: + +Link Analysis +============= + +.. autosummary:: + :toctree: ../../apiref + + rustworkx.pagerank + rustworkx.hits diff --git a/docs/source/api/algorithm_functions/matching.rst b/docs/source/api/algorithm_functions/matching.rst new file mode 100644 index 000000000..f89bcb549 --- /dev/null +++ b/docs/source/api/algorithm_functions/matching.rst @@ -0,0 +1,11 @@ +.. _matching: + +Matching +======== + +.. autosummary:: + :toctree: ../../apiref + + rustworkx.max_weight_matching + rustworkx.is_matching + rustworkx.is_maximal_matching diff --git a/docs/source/api/algorithm_functions/other.rst b/docs/source/api/algorithm_functions/other.rst new file mode 100644 index 000000000..a615e5e80 --- /dev/null +++ b/docs/source/api/algorithm_functions/other.rst @@ -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 diff --git a/docs/source/api/algorithm_functions/shortest_paths.rst b/docs/source/api/algorithm_functions/shortest_paths.rst new file mode 100644 index 000000000..9a7f98961 --- /dev/null +++ b/docs/source/api/algorithm_functions/shortest_paths.rst @@ -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 diff --git a/docs/source/api/algorithm_functions/traversal.rst b/docs/source/api/algorithm_functions/traversal.rst new file mode 100644 index 000000000..c3a210c5e --- /dev/null +++ b/docs/source/api/algorithm_functions/traversal.rst @@ -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 diff --git a/docs/source/api/algorithm_functions/tree.rst b/docs/source/api/algorithm_functions/tree.rst new file mode 100644 index 000000000..1664dafed --- /dev/null +++ b/docs/source/api/algorithm_functions/tree.rst @@ -0,0 +1,11 @@ +.. _tree: + +Tree +==== + +.. autosummary:: + :toctree: ../../apiref + + rustworkx.minimum_spanning_edges + rustworkx.minimum_spanning_tree + rustworkx.steiner_tree diff --git a/docs/source/api/converters.rst b/docs/source/api/converters.rst new file mode 100644 index 000000000..44b5b9c8e --- /dev/null +++ b/docs/source/api/converters.rst @@ -0,0 +1,9 @@ +.. _converters: + +Converters +========== + +.. autosummary:: + :toctree: ../apiref + + rustworkx.networkx_converter diff --git a/docs/source/api/custom_return_types.rst b/docs/source/api/custom_return_types.rst new file mode 100644 index 000000000..650342073 --- /dev/null +++ b/docs/source/api/custom_return_types.rst @@ -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 diff --git a/docs/source/api/exceptions.rst b/docs/source/api/exceptions.rst new file mode 100644 index 000000000..05d4ea32b --- /dev/null +++ b/docs/source/api/exceptions.rst @@ -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 diff --git a/docs/source/api/generators.rst b/docs/source/api/generators.rst new file mode 100644 index 000000000..9e173eb6b --- /dev/null +++ b/docs/source/api/generators.rst @@ -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 diff --git a/docs/source/api/graph_classes.rst b/docs/source/api/graph_classes.rst new file mode 100644 index 000000000..6b53ea6e6 --- /dev/null +++ b/docs/source/api/graph_classes.rst @@ -0,0 +1,9 @@ +Graph Classes +============= + +.. autosummary:: + :toctree: ../apiref + + rustworkx.PyGraph + rustworkx.PyDiGraph + rustworkx.PyDAG diff --git a/docs/source/api/index.rst b/docs/source/api/index.rst new file mode 100644 index 000000000..f55283746 --- /dev/null +++ b/docs/source/api/index.rst @@ -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 diff --git a/docs/source/api/layout_functions.rst b/docs/source/api/layout_functions.rst new file mode 100644 index 000000000..7012c0ef7 --- /dev/null +++ b/docs/source/api/layout_functions.rst @@ -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 diff --git a/docs/source/api/pydigraph_api_functions.rst b/docs/source/api/pydigraph_api_functions.rst new file mode 100644 index 000000000..d584a7312 --- /dev/null +++ b/docs/source/api/pydigraph_api_functions.rst @@ -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 diff --git a/docs/source/api/pygraph_api_functions.rst b/docs/source/api/pygraph_api_functions.rst new file mode 100644 index 000000000..41c8ca368 --- /dev/null +++ b/docs/source/api/pygraph_api_functions.rst @@ -0,0 +1,58 @@ +.. _api-functions-pygraph: + +API functions for PyGraph +========================= + +These functions are algorithm functions that are type specific for +:class:`~rustworkx.PyGraph` objects. Universal functions from Rustworkx API that +work for both graph types internally call the functions from the explicitly +typed API based on the data type. + +.. autosummary:: + :toctree: ../apiref + + rustworkx.graph_is_isomorphic + rustworkx.graph_is_subgraph_isomorphic + rustworkx.graph_vf2_mapping + rustworkx.graph_distance_matrix + rustworkx.graph_floyd_warshall + rustworkx.graph_floyd_warshall_numpy + rustworkx.graph_adjacency_matrix + rustworkx.graph_all_simple_paths + rustworkx.graph_all_pairs_all_simple_paths + rustworkx.graph_astar_shortest_path + rustworkx.graph_dijkstra_shortest_paths + rustworkx.graph_dijkstra_shortest_path_lengths + rustworkx.graph_all_pairs_dijkstra_shortest_paths + rustworkx.graph_k_shortest_path_lengths + rustworkx.graph_all_pairs_dijkstra_path_lengths + rustworkx.graph_bellman_ford_shortest_path_lengths + rustworkx.graph_bellman_ford_shortest_path_lengths + rustworkx.graph_all_pairs_bellman_ford_shortest_paths + rustworkx.graph_all_pairs_bellman_ford_path_lengths + rustworkx.graph_dfs_edges + rustworkx.graph_dfs_search + rustworkx.graph_transitivity + rustworkx.graph_core_number + rustworkx.graph_complement + rustworkx.graph_union + rustworkx.graph_tensor_product + rustworkx.graph_token_swapper + rustworkx.graph_cartesian_product + rustworkx.graph_random_layout + rustworkx.graph_bipartite_layout + rustworkx.graph_circular_layout + rustworkx.graph_shell_layout + rustworkx.graph_spiral_layout + rustworkx.graph_spring_layout + rustworkx.graph_num_shortest_paths_unweighted + rustworkx.graph_betweenness_centrality + rustworkx.graph_edge_betweenness_centrality + rustworkx.graph_closeness_centrality + rustworkx.graph_eigenvector_centrality + rustworkx.graph_katz_centrality + rustworkx.graph_unweighted_average_shortest_path_length + rustworkx.graph_bfs_search + rustworkx.graph_dijkstra_search + rustworkx.graph_node_link_json + rustworkx.graph_longest_simple_path diff --git a/docs/source/api/random_graph_generator_functions.rst b/docs/source/api/random_graph_generator_functions.rst new file mode 100644 index 000000000..59ffbe63b --- /dev/null +++ b/docs/source/api/random_graph_generator_functions.rst @@ -0,0 +1,13 @@ +.. _random_generators: + +Random Graph Generator Functions +================================ + +.. autosummary:: + :toctree: ../apiref + + rustworkx.directed_gnp_random_graph + rustworkx.undirected_gnp_random_graph + rustworkx.directed_gnm_random_graph + rustworkx.undirected_gnm_random_graph + rustworkx.random_geometric_graph diff --git a/docs/source/api/serialization.rst b/docs/source/api/serialization.rst new file mode 100644 index 000000000..8f715e624 --- /dev/null +++ b/docs/source/api/serialization.rst @@ -0,0 +1,10 @@ +.. _serialization: + +Serialization +============= + +.. autosummary:: + :toctree: ../apiref + + rustworkx.node_link_json + rustworkx.read_graphml diff --git a/docs/source/index.rst b/docs/source/index.rst index 2a5d959f3..b5f1d17cc 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -52,9 +52,10 @@ Contents: .. toctree:: :maxdepth: 2 + About Rustworkx Installation and Getting Started Rustworkx Tutorials and Guides - Rustworkx API + Rustworkx API Visualization Release Notes Contributing Guide diff --git a/docs/source/install.rst b/docs/source/install.rst index 1f1ed32a3..a51d4a235 100644 --- a/docs/source/install.rst +++ b/docs/source/install.rst @@ -1,3 +1,4 @@ +=============== Getting Started ===============