okstra 0.108.0 → 0.109.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/runtime/BUILD.json +2 -2
- package/runtime/prompts/profiles/_common-contract.md +1 -1
- package/runtime/python/okstra_ctl/graphify_cmd.py +225 -0
- package/runtime/python/okstra_ctl/resolve_task_key.py +15 -9
- package/runtime/python/okstra_project/__init__.py +2 -0
- package/runtime/python/okstra_project/state.py +36 -0
- package/runtime/python/okstra_vendor/__init__.py +41 -0
- package/runtime/python/okstra_vendor/graphify/.vendored-version +1 -0
- package/runtime/python/okstra_vendor/graphify/__init__.py +28 -0
- package/runtime/python/okstra_vendor/graphify/__main__.py +1371 -0
- package/runtime/python/okstra_vendor/graphify/analyze.py +540 -0
- package/runtime/python/okstra_vendor/graphify/benchmark.py +129 -0
- package/runtime/python/okstra_vendor/graphify/build.py +107 -0
- package/runtime/python/okstra_vendor/graphify/cache.py +169 -0
- package/runtime/python/okstra_vendor/graphify/cluster.py +137 -0
- package/runtime/python/okstra_vendor/graphify/detect.py +510 -0
- package/runtime/python/okstra_vendor/graphify/export.py +1014 -0
- package/runtime/python/okstra_vendor/graphify/extract.py +3277 -0
- package/runtime/python/okstra_vendor/graphify/hooks.py +220 -0
- package/runtime/python/okstra_vendor/graphify/ingest.py +297 -0
- package/runtime/python/okstra_vendor/graphify/manifest.py +4 -0
- package/runtime/python/okstra_vendor/graphify/report.py +175 -0
- package/runtime/python/okstra_vendor/graphify/security.py +203 -0
- package/runtime/python/okstra_vendor/graphify/serve.py +373 -0
- package/runtime/python/okstra_vendor/graphify/skill-aider.md +1184 -0
- package/runtime/python/okstra_vendor/graphify/skill-claw.md +1184 -0
- package/runtime/python/okstra_vendor/graphify/skill-codex.md +1242 -0
- package/runtime/python/okstra_vendor/graphify/skill-copilot.md +1268 -0
- package/runtime/python/okstra_vendor/graphify/skill-droid.md +1239 -0
- package/runtime/python/okstra_vendor/graphify/skill-kiro.md +1183 -0
- package/runtime/python/okstra_vendor/graphify/skill-opencode.md +1238 -0
- package/runtime/python/okstra_vendor/graphify/skill-trae.md +1208 -0
- package/runtime/python/okstra_vendor/graphify/skill-vscode.md +253 -0
- package/runtime/python/okstra_vendor/graphify/skill-windows.md +1245 -0
- package/runtime/python/okstra_vendor/graphify/skill.md +1319 -0
- package/runtime/python/okstra_vendor/graphify/transcribe.py +182 -0
- package/runtime/python/okstra_vendor/graphify/validate.py +72 -0
- package/runtime/python/okstra_vendor/graphify/watch.py +188 -0
- package/runtime/python/okstra_vendor/graphify/wiki.py +214 -0
- package/runtime/python/okstra_vendor/networkx/__init__.py +62 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/__init__.py +134 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/approximation/__init__.py +26 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/approximation/clique.py +259 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/approximation/clustering_coefficient.py +71 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/approximation/connectivity.py +412 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/approximation/density.py +396 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/approximation/distance_measures.py +150 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/approximation/dominating_set.py +149 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/approximation/kcomponents.py +369 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/approximation/matching.py +44 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/approximation/maxcut.py +143 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/approximation/ramsey.py +53 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/approximation/steinertree.py +265 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/approximation/tests/__init__.py +0 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/approximation/tests/test_approx_clust_coeff.py +41 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/approximation/tests/test_clique.py +112 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/approximation/tests/test_connectivity.py +199 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/approximation/tests/test_density.py +146 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/approximation/tests/test_distance_measures.py +59 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/approximation/tests/test_dominating_set.py +78 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/approximation/tests/test_kcomponents.py +303 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/approximation/tests/test_matching.py +8 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/approximation/tests/test_maxcut.py +94 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/approximation/tests/test_ramsey.py +31 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/approximation/tests/test_steinertree.py +306 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/approximation/tests/test_traveling_salesman.py +1014 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/approximation/tests/test_treewidth.py +274 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/approximation/tests/test_vertex_cover.py +68 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/approximation/traveling_salesman.py +1508 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/approximation/treewidth.py +255 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/approximation/vertex_cover.py +83 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/assortativity/__init__.py +5 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/assortativity/connectivity.py +122 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/assortativity/correlation.py +302 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/assortativity/mixing.py +255 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/assortativity/neighbor_degree.py +160 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/assortativity/pairs.py +127 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/assortativity/tests/__init__.py +0 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/assortativity/tests/base_test.py +81 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/assortativity/tests/test_connectivity.py +143 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/assortativity/tests/test_correlation.py +122 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/assortativity/tests/test_mixing.py +174 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/assortativity/tests/test_neighbor_degree.py +107 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/assortativity/tests/test_pairs.py +87 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/asteroidal.py +164 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/bipartite/__init__.py +88 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/bipartite/basic.py +322 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/bipartite/centrality.py +290 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/bipartite/cluster.py +289 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/bipartite/covering.py +57 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/bipartite/edgelist.py +360 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/bipartite/extendability.py +105 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/bipartite/generators.py +603 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/bipartite/link_analysis.py +316 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/bipartite/matching.py +590 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/bipartite/matrix.py +232 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/bipartite/projection.py +526 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/bipartite/redundancy.py +112 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/bipartite/spectral.py +69 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/bipartite/tests/__init__.py +0 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/bipartite/tests/test_basic.py +125 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/bipartite/tests/test_centrality.py +192 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/bipartite/tests/test_cluster.py +84 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/bipartite/tests/test_covering.py +33 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/bipartite/tests/test_edgelist.py +240 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/bipartite/tests/test_extendability.py +334 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/bipartite/tests/test_generators.py +407 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/bipartite/tests/test_link_analysis.py +218 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/bipartite/tests/test_matching.py +327 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/bipartite/tests/test_matrix.py +138 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/bipartite/tests/test_project.py +409 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/bipartite/tests/test_redundancy.py +35 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/bipartite/tests/test_spectral_bipartivity.py +80 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/boundary.py +168 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/bridges.py +205 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/broadcasting.py +164 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/centrality/__init__.py +20 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/centrality/betweenness.py +591 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/centrality/betweenness_subset.py +236 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/centrality/closeness.py +282 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/centrality/current_flow_betweenness.py +364 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/centrality/current_flow_betweenness_subset.py +227 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/centrality/current_flow_closeness.py +96 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/centrality/degree_alg.py +150 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/centrality/dispersion.py +107 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/centrality/eigenvector.py +357 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/centrality/flow_matrix.py +130 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/centrality/group.py +787 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/centrality/harmonic.py +88 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/centrality/katz.py +331 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/centrality/laplacian.py +150 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/centrality/load.py +200 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/centrality/percolation.py +128 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/centrality/reaching.py +209 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/centrality/second_order.py +141 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/centrality/subgraph_alg.py +361 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/centrality/tests/__init__.py +0 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/centrality/tests/test_betweenness_centrality.py +923 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/centrality/tests/test_betweenness_centrality_subset.py +354 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/centrality/tests/test_closeness_centrality.py +274 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/centrality/tests/test_current_flow_betweenness_centrality.py +259 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/centrality/tests/test_current_flow_betweenness_centrality_subset.py +147 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/centrality/tests/test_current_flow_closeness.py +43 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/centrality/tests/test_degree_centrality.py +144 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/centrality/tests/test_dispersion.py +73 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/centrality/tests/test_eigenvector_centrality.py +186 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/centrality/tests/test_group.py +277 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/centrality/tests/test_harmonic_centrality.py +122 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/centrality/tests/test_katz_centrality.py +345 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/centrality/tests/test_laplacian_centrality.py +220 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/centrality/tests/test_load_centrality.py +344 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/centrality/tests/test_percolation_centrality.py +87 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/centrality/tests/test_reaching.py +140 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/centrality/tests/test_second_order_centrality.py +82 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/centrality/tests/test_subgraph.py +110 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/centrality/tests/test_trophic.py +302 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/centrality/tests/test_voterank.py +64 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/centrality/trophic.py +181 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/centrality/voterank_alg.py +95 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/chains.py +172 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/chordal.py +443 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/clique.py +818 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/cluster.py +732 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/coloring/__init__.py +4 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/coloring/equitable_coloring.py +505 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/coloring/greedy_coloring.py +565 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/coloring/tests/__init__.py +0 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/coloring/tests/test_coloring.py +863 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/communicability_alg.py +163 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/community/__init__.py +28 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/community/asyn_fluid.py +153 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/community/bipartitions.py +354 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/community/centrality.py +171 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/community/community_utils.py +30 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/community/divisive.py +216 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/community/kclique.py +79 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/community/label_propagation.py +338 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/community/leiden.py +162 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/community/local.py +220 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/community/louvain.py +384 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/community/lukes.py +227 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/community/modularity_max.py +452 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/community/quality.py +347 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/community/tests/__init__.py +0 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/community/tests/test_asyn_fluid.py +147 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/community/tests/test_bipartitions.py +157 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/community/tests/test_centrality.py +85 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/community/tests/test_divisive.py +106 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/community/tests/test_kclique.py +91 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/community/tests/test_label_propagation.py +241 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/community/tests/test_leiden.py +138 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/community/tests/test_local.py +76 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/community/tests/test_louvain.py +264 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/community/tests/test_lukes.py +152 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/community/tests/test_modularity_max.py +340 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/community/tests/test_quality.py +139 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/community/tests/test_utils.py +26 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/components/__init__.py +6 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/components/attracting.py +115 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/components/biconnected.py +394 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/components/connected.py +282 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/components/semiconnected.py +71 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/components/strongly_connected.py +359 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/components/tests/__init__.py +0 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/components/tests/test_attracting.py +70 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/components/tests/test_biconnected.py +248 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/components/tests/test_connected.py +138 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/components/tests/test_semiconnected.py +55 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/components/tests/test_strongly_connected.py +193 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/components/tests/test_weakly_connected.py +96 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/components/weakly_connected.py +196 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/connectivity/__init__.py +11 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/connectivity/connectivity.py +811 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/connectivity/cuts.py +616 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/connectivity/disjoint_paths.py +408 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/connectivity/edge_augmentation.py +1270 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/connectivity/edge_kcomponents.py +592 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/connectivity/kcomponents.py +220 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/connectivity/kcutsets.py +235 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/connectivity/stoerwagner.py +152 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/connectivity/tests/__init__.py +0 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/connectivity/tests/test_connectivity.py +421 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/connectivity/tests/test_cuts.py +309 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/connectivity/tests/test_disjoint_paths.py +249 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/connectivity/tests/test_edge_augmentation.py +502 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/connectivity/tests/test_edge_kcomponents.py +488 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/connectivity/tests/test_kcomponents.py +323 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/connectivity/tests/test_kcutsets.py +280 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/connectivity/tests/test_stoer_wagner.py +102 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/connectivity/utils.py +88 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/core.py +588 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/covering.py +142 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/cuts.py +416 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/cycles.py +1234 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/d_separation.py +677 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/dag.py +1392 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/distance_measures.py +1095 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/distance_regular.py +272 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/dominance.py +142 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/dominating.py +268 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/efficiency_measures.py +167 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/euler.py +470 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/flow/__init__.py +11 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/flow/boykovkolmogorov.py +370 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/flow/capacityscaling.py +407 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/flow/dinitz_alg.py +238 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/flow/edmondskarp.py +241 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/flow/gomory_hu.py +178 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/flow/maxflow.py +611 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/flow/mincost.py +356 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/flow/networksimplex.py +662 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/flow/preflowpush.py +425 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/flow/shortestaugmentingpath.py +300 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/flow/tests/__init__.py +0 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/flow/tests/gl1.gpickle.bz2 +0 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/flow/tests/gw1.gpickle.bz2 +0 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/flow/tests/netgen-2.gpickle.bz2 +0 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/flow/tests/test_gomory_hu.py +128 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/flow/tests/test_maxflow.py +573 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/flow/tests/test_maxflow_large_graph.py +155 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/flow/tests/test_mincost.py +475 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/flow/tests/test_networksimplex.py +481 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/flow/tests/wlm3.gpickle.bz2 +0 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/flow/utils.py +194 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/graph_hashing.py +435 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/graphical.py +483 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/hierarchy.py +57 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/hybrid.py +196 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/isolate.py +107 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/isomorphism/__init__.py +7 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/isomorphism/ismags.py +1306 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/isomorphism/isomorph.py +336 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/isomorphism/isomorphvf2.py +1262 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/isomorphism/matchhelpers.py +352 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/isomorphism/temporalisomorphvf2.py +308 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/isomorphism/tests/__init__.py +0 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/isomorphism/tests/iso_r01_s80.A99 +0 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/isomorphism/tests/iso_r01_s80.B99 +0 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/isomorphism/tests/si2_b06_m200.A99 +0 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/isomorphism/tests/si2_b06_m200.B99 +0 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/isomorphism/tests/test_ismags.py +719 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/isomorphism/tests/test_isomorphism.py +103 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/isomorphism/tests/test_isomorphvf2.py +490 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/isomorphism/tests/test_match_helpers.py +64 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/isomorphism/tests/test_temporalisomorphvf2.py +212 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/isomorphism/tests/test_tree_isomorphism.py +202 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/isomorphism/tests/test_vf2pp.py +1655 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/isomorphism/tests/test_vf2pp_helpers.py +3118 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/isomorphism/tests/test_vf2userfunc.py +196 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/isomorphism/tree_isomorphism.py +264 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/isomorphism/vf2pp.py +1102 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/isomorphism/vf2userfunc.py +192 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/link_analysis/__init__.py +2 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/link_analysis/hits_alg.py +337 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/link_analysis/pagerank_alg.py +498 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/link_analysis/tests/__init__.py +0 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/link_analysis/tests/test_hits.py +77 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/link_analysis/tests/test_pagerank.py +213 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/link_prediction.py +687 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/lowest_common_ancestors.py +280 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/matching.py +1148 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/minors/__init__.py +27 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/minors/contraction.py +738 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/minors/tests/test_contraction.py +544 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/mis.py +78 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/moral.py +59 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/node_classification.py +219 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/non_randomness.py +155 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/operators/__init__.py +4 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/operators/all.py +324 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/operators/binary.py +468 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/operators/product.py +633 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/operators/tests/__init__.py +0 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/operators/tests/test_all.py +328 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/operators/tests/test_binary.py +451 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/operators/tests/test_product.py +491 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/operators/tests/test_unary.py +55 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/operators/unary.py +77 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/perfect_graph.py +73 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/planar_drawing.py +464 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/planarity.py +1463 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/polynomials.py +306 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/reciprocity.py +98 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/regular.py +167 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/richclub.py +138 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/shortest_paths/__init__.py +5 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/shortest_paths/astar.py +239 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/shortest_paths/dense.py +264 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/shortest_paths/generic.py +716 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/shortest_paths/tests/__init__.py +0 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/shortest_paths/tests/test_astar.py +254 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/shortest_paths/tests/test_dense.py +212 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/shortest_paths/tests/test_dense_numpy.py +88 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/shortest_paths/tests/test_generic.py +511 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/shortest_paths/tests/test_unweighted.py +149 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/shortest_paths/tests/test_weighted.py +983 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/shortest_paths/unweighted.py +625 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/shortest_paths/weighted.py +2542 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/similarity.py +2107 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/simple_paths.py +966 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/smallworld.py +404 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/smetric.py +30 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/sparsifiers.py +296 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/structuralholes.py +374 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/summarization.py +564 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/swap.py +406 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/__init__.py +0 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_asteroidal.py +23 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_boundary.py +154 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_bridges.py +144 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_broadcasting.py +109 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_chains.py +136 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_chordal.py +129 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_clique.py +300 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_cluster.py +678 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_communicability.py +80 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_core.py +266 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_covering.py +85 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_cuts.py +171 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_cycles.py +984 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_d_separation.py +340 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_dag.py +835 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_distance_measures.py +831 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_distance_regular.py +85 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_dominance.py +299 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_dominating.py +115 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_efficiency.py +58 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_euler.py +314 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_graph_hashing.py +872 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_graphical.py +163 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_hierarchy.py +46 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_hybrid.py +24 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_isolate.py +26 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_link_prediction.py +615 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_lowest_common_ancestors.py +459 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_matching.py +556 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_max_weight_clique.py +179 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_mis.py +62 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_moral.py +15 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_node_classification.py +140 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_non_randomness.py +60 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_perfect_graph.py +27 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_planar_drawing.py +274 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_planarity.py +556 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_polynomials.py +57 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_reciprocity.py +37 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_regular.py +88 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_richclub.py +149 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_similarity.py +1158 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_simple_paths.py +803 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_smallworld.py +76 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_smetric.py +8 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_sparsifiers.py +138 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_structuralholes.py +191 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_summarization.py +642 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_swap.py +179 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_threshold.py +270 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_time_dependent.py +431 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_tournament.py +161 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_triads.py +248 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_vitality.py +41 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_voronoi.py +103 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_walks.py +54 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_wiener.py +157 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/threshold.py +981 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/time_dependent.py +142 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tournament.py +406 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/traversal/__init__.py +5 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/traversal/beamsearch.py +90 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/traversal/breadth_first_search.py +576 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/traversal/depth_first_search.py +529 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/traversal/edgebfs.py +185 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/traversal/edgedfs.py +182 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/traversal/tests/__init__.py +0 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/traversal/tests/test_beamsearch.py +25 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/traversal/tests/test_bfs.py +203 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/traversal/tests/test_dfs.py +307 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/traversal/tests/test_edgebfs.py +147 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/traversal/tests/test_edgedfs.py +131 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tree/__init__.py +7 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tree/branchings.py +1042 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tree/coding.py +413 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tree/decomposition.py +88 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tree/distance_measures.py +219 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tree/mst.py +1281 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tree/operations.py +106 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tree/recognition.py +273 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tree/tests/__init__.py +0 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tree/tests/test_branchings.py +624 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tree/tests/test_coding.py +114 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tree/tests/test_decomposition.py +79 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tree/tests/test_distance_measures.py +99 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tree/tests/test_mst.py +934 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tree/tests/test_operations.py +53 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tree/tests/test_recognition.py +174 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/triads.py +500 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/vitality.py +76 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/voronoi.py +86 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/walks.py +77 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/wiener.py +278 -0
- package/runtime/python/okstra_vendor/networkx/classes/__init__.py +13 -0
- package/runtime/python/okstra_vendor/networkx/classes/coreviews.py +435 -0
- package/runtime/python/okstra_vendor/networkx/classes/digraph.py +1363 -0
- package/runtime/python/okstra_vendor/networkx/classes/filters.py +95 -0
- package/runtime/python/okstra_vendor/networkx/classes/function.py +1549 -0
- package/runtime/python/okstra_vendor/networkx/classes/graph.py +2082 -0
- package/runtime/python/okstra_vendor/networkx/classes/graphviews.py +269 -0
- package/runtime/python/okstra_vendor/networkx/classes/multidigraph.py +977 -0
- package/runtime/python/okstra_vendor/networkx/classes/multigraph.py +1294 -0
- package/runtime/python/okstra_vendor/networkx/classes/reportviews.py +1447 -0
- package/runtime/python/okstra_vendor/networkx/classes/tests/__init__.py +0 -0
- package/runtime/python/okstra_vendor/networkx/classes/tests/dispatch_interface.py +192 -0
- package/runtime/python/okstra_vendor/networkx/classes/tests/historical_tests.py +476 -0
- package/runtime/python/okstra_vendor/networkx/classes/tests/test_coreviews.py +362 -0
- package/runtime/python/okstra_vendor/networkx/classes/tests/test_digraph.py +331 -0
- package/runtime/python/okstra_vendor/networkx/classes/tests/test_digraph_historical.py +110 -0
- package/runtime/python/okstra_vendor/networkx/classes/tests/test_filters.py +177 -0
- package/runtime/python/okstra_vendor/networkx/classes/tests/test_function.py +1045 -0
- package/runtime/python/okstra_vendor/networkx/classes/tests/test_graph.py +950 -0
- package/runtime/python/okstra_vendor/networkx/classes/tests/test_graph_historical.py +12 -0
- package/runtime/python/okstra_vendor/networkx/classes/tests/test_graphviews.py +349 -0
- package/runtime/python/okstra_vendor/networkx/classes/tests/test_multidigraph.py +459 -0
- package/runtime/python/okstra_vendor/networkx/classes/tests/test_multigraph.py +528 -0
- package/runtime/python/okstra_vendor/networkx/classes/tests/test_reportviews.py +1421 -0
- package/runtime/python/okstra_vendor/networkx/classes/tests/test_special.py +131 -0
- package/runtime/python/okstra_vendor/networkx/classes/tests/test_subgraphviews.py +371 -0
- package/runtime/python/okstra_vendor/networkx/conftest.py +261 -0
- package/runtime/python/okstra_vendor/networkx/convert.py +502 -0
- package/runtime/python/okstra_vendor/networkx/convert_matrix.py +1314 -0
- package/runtime/python/okstra_vendor/networkx/drawing/__init__.py +7 -0
- package/runtime/python/okstra_vendor/networkx/drawing/layout.py +2036 -0
- package/runtime/python/okstra_vendor/networkx/drawing/nx_agraph.py +470 -0
- package/runtime/python/okstra_vendor/networkx/drawing/nx_latex.py +570 -0
- package/runtime/python/okstra_vendor/networkx/drawing/nx_pydot.py +361 -0
- package/runtime/python/okstra_vendor/networkx/drawing/nx_pylab.py +2978 -0
- package/runtime/python/okstra_vendor/networkx/drawing/tests/__init__.py +0 -0
- package/runtime/python/okstra_vendor/networkx/drawing/tests/baseline/test_display_complex.png +0 -0
- package/runtime/python/okstra_vendor/networkx/drawing/tests/baseline/test_display_empty_graph.png +0 -0
- package/runtime/python/okstra_vendor/networkx/drawing/tests/baseline/test_display_house_with_colors.png +0 -0
- package/runtime/python/okstra_vendor/networkx/drawing/tests/baseline/test_display_labels_and_colors.png +0 -0
- package/runtime/python/okstra_vendor/networkx/drawing/tests/baseline/test_display_shortest_path.png +0 -0
- package/runtime/python/okstra_vendor/networkx/drawing/tests/baseline/test_house_with_colors.png +0 -0
- package/runtime/python/okstra_vendor/networkx/drawing/tests/test_agraph.py +237 -0
- package/runtime/python/okstra_vendor/networkx/drawing/tests/test_image_comparison_pylab_mpl.py +229 -0
- package/runtime/python/okstra_vendor/networkx/drawing/tests/test_latex.py +285 -0
- package/runtime/python/okstra_vendor/networkx/drawing/tests/test_layout.py +631 -0
- package/runtime/python/okstra_vendor/networkx/drawing/tests/test_pydot.py +146 -0
- package/runtime/python/okstra_vendor/networkx/drawing/tests/test_pylab.py +1582 -0
- package/runtime/python/okstra_vendor/networkx/exception.py +131 -0
- package/runtime/python/okstra_vendor/networkx/generators/__init__.py +34 -0
- package/runtime/python/okstra_vendor/networkx/generators/atlas.dat.gz +0 -0
- package/runtime/python/okstra_vendor/networkx/generators/atlas.py +227 -0
- package/runtime/python/okstra_vendor/networkx/generators/classic.py +1091 -0
- package/runtime/python/okstra_vendor/networkx/generators/cographs.py +68 -0
- package/runtime/python/okstra_vendor/networkx/generators/community.py +1070 -0
- package/runtime/python/okstra_vendor/networkx/generators/degree_seq.py +886 -0
- package/runtime/python/okstra_vendor/networkx/generators/directed.py +572 -0
- package/runtime/python/okstra_vendor/networkx/generators/duplication.py +174 -0
- package/runtime/python/okstra_vendor/networkx/generators/ego.py +66 -0
- package/runtime/python/okstra_vendor/networkx/generators/expanders.py +499 -0
- package/runtime/python/okstra_vendor/networkx/generators/geometric.py +1037 -0
- package/runtime/python/okstra_vendor/networkx/generators/harary_graph.py +163 -0
- package/runtime/python/okstra_vendor/networkx/generators/internet_as_graphs.py +443 -0
- package/runtime/python/okstra_vendor/networkx/generators/intersection.py +125 -0
- package/runtime/python/okstra_vendor/networkx/generators/interval_graph.py +70 -0
- package/runtime/python/okstra_vendor/networkx/generators/joint_degree_seq.py +664 -0
- package/runtime/python/okstra_vendor/networkx/generators/lattice.py +405 -0
- package/runtime/python/okstra_vendor/networkx/generators/line.py +501 -0
- package/runtime/python/okstra_vendor/networkx/generators/mycielski.py +110 -0
- package/runtime/python/okstra_vendor/networkx/generators/nonisomorphic_trees.py +259 -0
- package/runtime/python/okstra_vendor/networkx/generators/random_clustered.py +117 -0
- package/runtime/python/okstra_vendor/networkx/generators/random_graphs.py +1416 -0
- package/runtime/python/okstra_vendor/networkx/generators/small.py +1070 -0
- package/runtime/python/okstra_vendor/networkx/generators/social.py +554 -0
- package/runtime/python/okstra_vendor/networkx/generators/spectral_graph_forge.py +120 -0
- package/runtime/python/okstra_vendor/networkx/generators/stochastic.py +54 -0
- package/runtime/python/okstra_vendor/networkx/generators/sudoku.py +131 -0
- package/runtime/python/okstra_vendor/networkx/generators/tests/__init__.py +0 -0
- package/runtime/python/okstra_vendor/networkx/generators/tests/test_atlas.py +75 -0
- package/runtime/python/okstra_vendor/networkx/generators/tests/test_classic.py +642 -0
- package/runtime/python/okstra_vendor/networkx/generators/tests/test_cographs.py +20 -0
- package/runtime/python/okstra_vendor/networkx/generators/tests/test_community.py +362 -0
- package/runtime/python/okstra_vendor/networkx/generators/tests/test_degree_seq.py +224 -0
- package/runtime/python/okstra_vendor/networkx/generators/tests/test_directed.py +189 -0
- package/runtime/python/okstra_vendor/networkx/generators/tests/test_duplication.py +103 -0
- package/runtime/python/okstra_vendor/networkx/generators/tests/test_ego.py +39 -0
- package/runtime/python/okstra_vendor/networkx/generators/tests/test_expanders.py +182 -0
- package/runtime/python/okstra_vendor/networkx/generators/tests/test_geometric.py +488 -0
- package/runtime/python/okstra_vendor/networkx/generators/tests/test_harary_graph.py +133 -0
- package/runtime/python/okstra_vendor/networkx/generators/tests/test_internet_as_graphs.py +221 -0
- package/runtime/python/okstra_vendor/networkx/generators/tests/test_intersection.py +28 -0
- package/runtime/python/okstra_vendor/networkx/generators/tests/test_interval_graph.py +144 -0
- package/runtime/python/okstra_vendor/networkx/generators/tests/test_joint_degree_seq.py +125 -0
- package/runtime/python/okstra_vendor/networkx/generators/tests/test_lattice.py +264 -0
- package/runtime/python/okstra_vendor/networkx/generators/tests/test_line.py +316 -0
- package/runtime/python/okstra_vendor/networkx/generators/tests/test_mycielski.py +30 -0
- package/runtime/python/okstra_vendor/networkx/generators/tests/test_nonisomorphic_trees.py +82 -0
- package/runtime/python/okstra_vendor/networkx/generators/tests/test_random_clustered.py +33 -0
- package/runtime/python/okstra_vendor/networkx/generators/tests/test_random_graphs.py +495 -0
- package/runtime/python/okstra_vendor/networkx/generators/tests/test_small.py +220 -0
- package/runtime/python/okstra_vendor/networkx/generators/tests/test_spectral_graph_forge.py +49 -0
- package/runtime/python/okstra_vendor/networkx/generators/tests/test_stochastic.py +72 -0
- package/runtime/python/okstra_vendor/networkx/generators/tests/test_sudoku.py +92 -0
- package/runtime/python/okstra_vendor/networkx/generators/tests/test_time_series.py +64 -0
- package/runtime/python/okstra_vendor/networkx/generators/tests/test_trees.py +195 -0
- package/runtime/python/okstra_vendor/networkx/generators/tests/test_triads.py +15 -0
- package/runtime/python/okstra_vendor/networkx/generators/time_series.py +74 -0
- package/runtime/python/okstra_vendor/networkx/generators/trees.py +1070 -0
- package/runtime/python/okstra_vendor/networkx/generators/triads.py +94 -0
- package/runtime/python/okstra_vendor/networkx/lazy_imports.py +188 -0
- package/runtime/python/okstra_vendor/networkx/linalg/__init__.py +13 -0
- package/runtime/python/okstra_vendor/networkx/linalg/algebraicconnectivity.py +650 -0
- package/runtime/python/okstra_vendor/networkx/linalg/attrmatrix.py +466 -0
- package/runtime/python/okstra_vendor/networkx/linalg/bethehessianmatrix.py +77 -0
- package/runtime/python/okstra_vendor/networkx/linalg/graphmatrix.py +168 -0
- package/runtime/python/okstra_vendor/networkx/linalg/laplacianmatrix.py +512 -0
- package/runtime/python/okstra_vendor/networkx/linalg/modularitymatrix.py +166 -0
- package/runtime/python/okstra_vendor/networkx/linalg/spectrum.py +186 -0
- package/runtime/python/okstra_vendor/networkx/linalg/tests/__init__.py +0 -0
- package/runtime/python/okstra_vendor/networkx/linalg/tests/test_algebraic_connectivity.py +400 -0
- package/runtime/python/okstra_vendor/networkx/linalg/tests/test_attrmatrix.py +108 -0
- package/runtime/python/okstra_vendor/networkx/linalg/tests/test_bethehessian.py +40 -0
- package/runtime/python/okstra_vendor/networkx/linalg/tests/test_graphmatrix.py +275 -0
- package/runtime/python/okstra_vendor/networkx/linalg/tests/test_laplacian.py +334 -0
- package/runtime/python/okstra_vendor/networkx/linalg/tests/test_modularity.py +86 -0
- package/runtime/python/okstra_vendor/networkx/linalg/tests/test_spectrum.py +70 -0
- package/runtime/python/okstra_vendor/networkx/readwrite/__init__.py +17 -0
- package/runtime/python/okstra_vendor/networkx/readwrite/adjlist.py +330 -0
- package/runtime/python/okstra_vendor/networkx/readwrite/edgelist.py +489 -0
- package/runtime/python/okstra_vendor/networkx/readwrite/gexf.py +1084 -0
- package/runtime/python/okstra_vendor/networkx/readwrite/gml.py +879 -0
- package/runtime/python/okstra_vendor/networkx/readwrite/graph6.py +427 -0
- package/runtime/python/okstra_vendor/networkx/readwrite/graphml.py +1053 -0
- package/runtime/python/okstra_vendor/networkx/readwrite/json_graph/__init__.py +19 -0
- package/runtime/python/okstra_vendor/networkx/readwrite/json_graph/adjacency.py +156 -0
- package/runtime/python/okstra_vendor/networkx/readwrite/json_graph/cytoscape.py +190 -0
- package/runtime/python/okstra_vendor/networkx/readwrite/json_graph/node_link.py +261 -0
- package/runtime/python/okstra_vendor/networkx/readwrite/json_graph/tests/__init__.py +0 -0
- package/runtime/python/okstra_vendor/networkx/readwrite/json_graph/tests/test_adjacency.py +78 -0
- package/runtime/python/okstra_vendor/networkx/readwrite/json_graph/tests/test_cytoscape.py +78 -0
- package/runtime/python/okstra_vendor/networkx/readwrite/json_graph/tests/test_node_link.py +109 -0
- package/runtime/python/okstra_vendor/networkx/readwrite/json_graph/tests/test_tree.py +48 -0
- package/runtime/python/okstra_vendor/networkx/readwrite/json_graph/tree.py +137 -0
- package/runtime/python/okstra_vendor/networkx/readwrite/leda.py +108 -0
- package/runtime/python/okstra_vendor/networkx/readwrite/multiline_adjlist.py +393 -0
- package/runtime/python/okstra_vendor/networkx/readwrite/p2g.py +113 -0
- package/runtime/python/okstra_vendor/networkx/readwrite/pajek.py +286 -0
- package/runtime/python/okstra_vendor/networkx/readwrite/sparse6.py +379 -0
- package/runtime/python/okstra_vendor/networkx/readwrite/tests/__init__.py +0 -0
- package/runtime/python/okstra_vendor/networkx/readwrite/tests/test_adjlist.py +354 -0
- package/runtime/python/okstra_vendor/networkx/readwrite/tests/test_edgelist.py +318 -0
- package/runtime/python/okstra_vendor/networkx/readwrite/tests/test_gexf.py +612 -0
- package/runtime/python/okstra_vendor/networkx/readwrite/tests/test_gml.py +744 -0
- package/runtime/python/okstra_vendor/networkx/readwrite/tests/test_graph6.py +181 -0
- package/runtime/python/okstra_vendor/networkx/readwrite/tests/test_graphml.py +1531 -0
- package/runtime/python/okstra_vendor/networkx/readwrite/tests/test_leda.py +30 -0
- package/runtime/python/okstra_vendor/networkx/readwrite/tests/test_p2g.py +63 -0
- package/runtime/python/okstra_vendor/networkx/readwrite/tests/test_pajek.py +128 -0
- package/runtime/python/okstra_vendor/networkx/readwrite/tests/test_sparse6.py +166 -0
- package/runtime/python/okstra_vendor/networkx/readwrite/tests/test_text.py +1742 -0
- package/runtime/python/okstra_vendor/networkx/readwrite/text.py +851 -0
- package/runtime/python/okstra_vendor/networkx/relabel.py +285 -0
- package/runtime/python/okstra_vendor/networkx/tests/__init__.py +0 -0
- package/runtime/python/okstra_vendor/networkx/tests/test_all_random_functions.py +248 -0
- package/runtime/python/okstra_vendor/networkx/tests/test_convert.py +321 -0
- package/runtime/python/okstra_vendor/networkx/tests/test_convert_numpy.py +531 -0
- package/runtime/python/okstra_vendor/networkx/tests/test_convert_pandas.py +349 -0
- package/runtime/python/okstra_vendor/networkx/tests/test_convert_scipy.py +281 -0
- package/runtime/python/okstra_vendor/networkx/tests/test_exceptions.py +40 -0
- package/runtime/python/okstra_vendor/networkx/tests/test_import.py +11 -0
- package/runtime/python/okstra_vendor/networkx/tests/test_lazy_imports.py +96 -0
- package/runtime/python/okstra_vendor/networkx/tests/test_relabel.py +349 -0
- package/runtime/python/okstra_vendor/networkx/tests/test_removed_functions_exception_messages.py +8 -0
- package/runtime/python/okstra_vendor/networkx/utils/__init__.py +8 -0
- package/runtime/python/okstra_vendor/networkx/utils/backends.py +2171 -0
- package/runtime/python/okstra_vendor/networkx/utils/configs.py +396 -0
- package/runtime/python/okstra_vendor/networkx/utils/decorators.py +1233 -0
- package/runtime/python/okstra_vendor/networkx/utils/heaps.py +338 -0
- package/runtime/python/okstra_vendor/networkx/utils/mapped_queue.py +297 -0
- package/runtime/python/okstra_vendor/networkx/utils/misc.py +703 -0
- package/runtime/python/okstra_vendor/networkx/utils/random_sequence.py +198 -0
- package/runtime/python/okstra_vendor/networkx/utils/rcm.py +159 -0
- package/runtime/python/okstra_vendor/networkx/utils/tests/__init__.py +0 -0
- package/runtime/python/okstra_vendor/networkx/utils/tests/test__init.py +11 -0
- package/runtime/python/okstra_vendor/networkx/utils/tests/test_backends.py +225 -0
- package/runtime/python/okstra_vendor/networkx/utils/tests/test_config.py +263 -0
- package/runtime/python/okstra_vendor/networkx/utils/tests/test_decorators.py +510 -0
- package/runtime/python/okstra_vendor/networkx/utils/tests/test_heaps.py +131 -0
- package/runtime/python/okstra_vendor/networkx/utils/tests/test_mapped_queue.py +268 -0
- package/runtime/python/okstra_vendor/networkx/utils/tests/test_misc.py +393 -0
- package/runtime/python/okstra_vendor/networkx/utils/tests/test_random_sequence.py +53 -0
- package/runtime/python/okstra_vendor/networkx/utils/tests/test_rcm.py +63 -0
- package/runtime/python/okstra_vendor/networkx/utils/tests/test_unionfind.py +55 -0
- package/runtime/python/okstra_vendor/networkx/utils/union_find.py +106 -0
- package/runtime/skills/okstra-graphify/SKILL.md +161 -0
- package/runtime/skills/okstra-inspect/SKILL.md +17 -9
- package/runtime/templates/reports/settings.template.json +4 -0
- package/src/cli-registry.mjs +7 -0
- package/src/commands/graphify.mjs +32 -0
- package/src/commands/lifecycle/doctor.mjs +9 -0
- package/src/lib/skill-catalog.mjs +1 -0
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
"""Functions for computing rich-club coefficients."""
|
|
2
|
+
|
|
3
|
+
from itertools import accumulate
|
|
4
|
+
|
|
5
|
+
import networkx as nx
|
|
6
|
+
from networkx.utils import not_implemented_for
|
|
7
|
+
|
|
8
|
+
__all__ = ["rich_club_coefficient"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
@not_implemented_for("directed")
|
|
12
|
+
@not_implemented_for("multigraph")
|
|
13
|
+
@nx._dispatchable
|
|
14
|
+
def rich_club_coefficient(G, normalized=True, Q=100, seed=None):
|
|
15
|
+
r"""Returns the rich-club coefficient of the graph `G`.
|
|
16
|
+
|
|
17
|
+
For each degree *k*, the *rich-club coefficient* is the ratio of the
|
|
18
|
+
number of actual to the number of potential edges for nodes with
|
|
19
|
+
degree greater than *k*:
|
|
20
|
+
|
|
21
|
+
.. math::
|
|
22
|
+
|
|
23
|
+
\phi(k) = \frac{2 E_k}{N_k (N_k - 1)}
|
|
24
|
+
|
|
25
|
+
where `N_k` is the number of nodes with degree larger than *k*, and
|
|
26
|
+
`E_k` is the number of edges among those nodes.
|
|
27
|
+
|
|
28
|
+
Parameters
|
|
29
|
+
----------
|
|
30
|
+
G : NetworkX graph
|
|
31
|
+
Undirected graph with neither parallel edges nor self-loops.
|
|
32
|
+
normalized : bool (optional)
|
|
33
|
+
Normalize using randomized network as in [1]_
|
|
34
|
+
Q : float (optional, default=100)
|
|
35
|
+
If `normalized` is True, perform `Q * m` double-edge
|
|
36
|
+
swaps, where `m` is the number of edges in `G`, to use as a
|
|
37
|
+
null-model for normalization.
|
|
38
|
+
seed : integer, random_state, or None (default)
|
|
39
|
+
Indicator of random number generation state.
|
|
40
|
+
See :ref:`Randomness<randomness>`.
|
|
41
|
+
|
|
42
|
+
Returns
|
|
43
|
+
-------
|
|
44
|
+
rc : dictionary
|
|
45
|
+
A dictionary, keyed by degree, with rich-club coefficient values.
|
|
46
|
+
|
|
47
|
+
Raises
|
|
48
|
+
------
|
|
49
|
+
NetworkXError
|
|
50
|
+
If `G` has fewer than four nodes and ``normalized=True``.
|
|
51
|
+
A randomly sampled graph for normalization cannot be generated in this case.
|
|
52
|
+
|
|
53
|
+
Examples
|
|
54
|
+
--------
|
|
55
|
+
>>> G = nx.Graph([(0, 1), (0, 2), (1, 2), (1, 3), (1, 4), (4, 5)])
|
|
56
|
+
>>> rc = nx.rich_club_coefficient(G, normalized=False, seed=42)
|
|
57
|
+
>>> rc[0]
|
|
58
|
+
0.4
|
|
59
|
+
|
|
60
|
+
Notes
|
|
61
|
+
-----
|
|
62
|
+
The rich club definition and algorithm are found in [1]_. This
|
|
63
|
+
algorithm ignores any edge weights and is not defined for directed
|
|
64
|
+
graphs or graphs with parallel edges or self loops.
|
|
65
|
+
|
|
66
|
+
Normalization is done by computing the rich club coefficient for a randomly
|
|
67
|
+
sampled graph with the same degree distribution as `G` by
|
|
68
|
+
repeatedly swapping the endpoints of existing edges. For graphs with fewer than 4
|
|
69
|
+
nodes, it is not possible to generate a random graph with a prescribed
|
|
70
|
+
degree distribution, as the degree distribution fully determines the graph
|
|
71
|
+
(hence making the coefficients trivially normalized to 1).
|
|
72
|
+
This function raises an exception in this case.
|
|
73
|
+
|
|
74
|
+
Estimates for appropriate values of `Q` are found in [2]_.
|
|
75
|
+
|
|
76
|
+
References
|
|
77
|
+
----------
|
|
78
|
+
.. [1] Julian J. McAuley, Luciano da Fontoura Costa,
|
|
79
|
+
and Tibério S. Caetano,
|
|
80
|
+
"The rich-club phenomenon across complex network hierarchies",
|
|
81
|
+
Applied Physics Letters Vol 91 Issue 8, August 2007.
|
|
82
|
+
https://arxiv.org/abs/physics/0701290
|
|
83
|
+
.. [2] R. Milo, N. Kashtan, S. Itzkovitz, M. E. J. Newman, U. Alon,
|
|
84
|
+
"Uniform generation of random graphs with arbitrary degree
|
|
85
|
+
sequences", 2006. https://arxiv.org/abs/cond-mat/0312028
|
|
86
|
+
"""
|
|
87
|
+
if nx.number_of_selfloops(G) > 0:
|
|
88
|
+
raise Exception(
|
|
89
|
+
"rich_club_coefficient is not implemented for graphs with self loops."
|
|
90
|
+
)
|
|
91
|
+
rc = _compute_rc(G)
|
|
92
|
+
if normalized:
|
|
93
|
+
# make R a copy of G, randomize with Q*|E| double edge swaps
|
|
94
|
+
# and use rich_club coefficient of R to normalize
|
|
95
|
+
R = G.copy()
|
|
96
|
+
E = R.number_of_edges()
|
|
97
|
+
nx.double_edge_swap(R, Q * E, max_tries=Q * E * 10, seed=seed)
|
|
98
|
+
rcran = _compute_rc(R)
|
|
99
|
+
rc = {k: v / rcran[k] for k, v in rc.items()}
|
|
100
|
+
return rc
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
def _compute_rc(G):
|
|
104
|
+
"""Returns the rich-club coefficient for each degree in the graph
|
|
105
|
+
`G`.
|
|
106
|
+
|
|
107
|
+
`G` is an undirected graph without multiedges.
|
|
108
|
+
|
|
109
|
+
Returns a dictionary mapping degree to rich-club coefficient for
|
|
110
|
+
that degree.
|
|
111
|
+
|
|
112
|
+
"""
|
|
113
|
+
deghist = nx.degree_histogram(G)
|
|
114
|
+
total = sum(deghist)
|
|
115
|
+
# Compute the number of nodes with degree greater than `k`, for each
|
|
116
|
+
# degree `k` (omitting the last entry, which is zero).
|
|
117
|
+
nks = (total - cs for cs in accumulate(deghist) if total - cs > 1)
|
|
118
|
+
# Create a sorted list of pairs of edge endpoint degrees.
|
|
119
|
+
#
|
|
120
|
+
# The list is sorted in reverse order so that we can pop from the
|
|
121
|
+
# right side of the list later, instead of popping from the left
|
|
122
|
+
# side of the list, which would have a linear time cost.
|
|
123
|
+
edge_degrees = sorted((sorted(map(G.degree, e)) for e in G.edges()), reverse=True)
|
|
124
|
+
ek = G.number_of_edges()
|
|
125
|
+
if ek == 0:
|
|
126
|
+
return {}
|
|
127
|
+
|
|
128
|
+
k1, k2 = edge_degrees.pop()
|
|
129
|
+
rc = {}
|
|
130
|
+
for d, nk in enumerate(nks):
|
|
131
|
+
while k1 <= d:
|
|
132
|
+
if len(edge_degrees) == 0:
|
|
133
|
+
ek = 0
|
|
134
|
+
break
|
|
135
|
+
k1, k2 = edge_degrees.pop()
|
|
136
|
+
ek -= 1
|
|
137
|
+
rc[d] = 2 * ek / (nk * (nk - 1))
|
|
138
|
+
return rc
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
from networkx.algorithms.shortest_paths.generic import *
|
|
2
|
+
from networkx.algorithms.shortest_paths.unweighted import *
|
|
3
|
+
from networkx.algorithms.shortest_paths.weighted import *
|
|
4
|
+
from networkx.algorithms.shortest_paths.astar import *
|
|
5
|
+
from networkx.algorithms.shortest_paths.dense import *
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
"""Shortest paths and path lengths using the A* ("A star") algorithm."""
|
|
2
|
+
|
|
3
|
+
from heapq import heappop, heappush
|
|
4
|
+
from itertools import count
|
|
5
|
+
|
|
6
|
+
import networkx as nx
|
|
7
|
+
from networkx.algorithms.shortest_paths.weighted import _weight_function
|
|
8
|
+
|
|
9
|
+
__all__ = ["astar_path", "astar_path_length"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@nx._dispatchable(edge_attrs="weight", preserve_node_attrs="heuristic")
|
|
13
|
+
def astar_path(G, source, target, heuristic=None, weight="weight", *, cutoff=None):
|
|
14
|
+
"""Returns a list of nodes in a shortest path between source and target
|
|
15
|
+
using the A* ("A-star") algorithm.
|
|
16
|
+
|
|
17
|
+
There may be more than one shortest path. This returns only one.
|
|
18
|
+
|
|
19
|
+
Parameters
|
|
20
|
+
----------
|
|
21
|
+
G : NetworkX graph
|
|
22
|
+
|
|
23
|
+
source : node
|
|
24
|
+
Starting node for path
|
|
25
|
+
|
|
26
|
+
target : node
|
|
27
|
+
Ending node for path
|
|
28
|
+
|
|
29
|
+
heuristic : function
|
|
30
|
+
A function to evaluate the estimate of the distance
|
|
31
|
+
from the a node to the target. The function takes
|
|
32
|
+
two nodes arguments and must return a number.
|
|
33
|
+
If the heuristic is inadmissible (if it might
|
|
34
|
+
overestimate the cost of reaching the goal from a node),
|
|
35
|
+
the result may not be a shortest path.
|
|
36
|
+
The algorithm does not support updating heuristic
|
|
37
|
+
values for the same node due to caching the first
|
|
38
|
+
heuristic calculation per node.
|
|
39
|
+
|
|
40
|
+
weight : string or function
|
|
41
|
+
If this is a string, then edge weights will be accessed via the
|
|
42
|
+
edge attribute with this key (that is, the weight of the edge
|
|
43
|
+
joining `u` to `v` will be ``G.edges[u, v][weight]``). If no
|
|
44
|
+
such edge attribute exists, the weight of the edge is assumed to
|
|
45
|
+
be one.
|
|
46
|
+
If this is a function, the weight of an edge is the value
|
|
47
|
+
returned by the function. The function must accept exactly three
|
|
48
|
+
positional arguments: the two endpoints of an edge and the
|
|
49
|
+
dictionary of edge attributes for that edge. The function must
|
|
50
|
+
return a number or None to indicate a hidden edge.
|
|
51
|
+
|
|
52
|
+
cutoff : float, optional
|
|
53
|
+
If this is provided, the search will be bounded to this value. I.e. if
|
|
54
|
+
the evaluation function surpasses this value for a node n, the node will not
|
|
55
|
+
be expanded further and will be ignored. More formally, let h'(n) be the
|
|
56
|
+
heuristic function, and g(n) be the cost of reaching n from the source node. Then,
|
|
57
|
+
if g(n) + h'(n) > cutoff, the node will not be explored further.
|
|
58
|
+
Note that if the heuristic is inadmissible, it is possible that paths
|
|
59
|
+
are ignored even though they satisfy the cutoff.
|
|
60
|
+
|
|
61
|
+
Raises
|
|
62
|
+
------
|
|
63
|
+
NetworkXNoPath
|
|
64
|
+
If no path exists between source and target.
|
|
65
|
+
|
|
66
|
+
Examples
|
|
67
|
+
--------
|
|
68
|
+
>>> G = nx.path_graph(5)
|
|
69
|
+
>>> print(nx.astar_path(G, 0, 4))
|
|
70
|
+
[0, 1, 2, 3, 4]
|
|
71
|
+
>>> G = nx.grid_graph(dim=[3, 3]) # nodes are two-tuples (x,y)
|
|
72
|
+
>>> nx.set_edge_attributes(G, {e: e[1][0] * 2 for e in G.edges()}, "cost")
|
|
73
|
+
>>> def dist(a, b):
|
|
74
|
+
... (x1, y1) = a
|
|
75
|
+
... (x2, y2) = b
|
|
76
|
+
... return ((x1 - x2) ** 2 + (y1 - y2) ** 2) ** 0.5
|
|
77
|
+
>>> print(nx.astar_path(G, (0, 0), (2, 2), heuristic=dist, weight="cost"))
|
|
78
|
+
[(0, 0), (0, 1), (0, 2), (1, 2), (2, 2)]
|
|
79
|
+
|
|
80
|
+
Notes
|
|
81
|
+
-----
|
|
82
|
+
Edge weight attributes must be numerical.
|
|
83
|
+
Distances are calculated as sums of weighted edges traversed.
|
|
84
|
+
|
|
85
|
+
The weight function can be used to hide edges by returning None.
|
|
86
|
+
So ``weight = lambda u, v, d: 1 if d['color']=="red" else None``
|
|
87
|
+
will find the shortest red path.
|
|
88
|
+
|
|
89
|
+
See Also
|
|
90
|
+
--------
|
|
91
|
+
shortest_path, dijkstra_path
|
|
92
|
+
|
|
93
|
+
"""
|
|
94
|
+
if source not in G:
|
|
95
|
+
raise nx.NodeNotFound(f"Source {source} is not in G")
|
|
96
|
+
|
|
97
|
+
if target not in G:
|
|
98
|
+
raise nx.NodeNotFound(f"Target {target} is not in G")
|
|
99
|
+
|
|
100
|
+
if heuristic is None:
|
|
101
|
+
# The default heuristic is h=0 - same as Dijkstra's algorithm
|
|
102
|
+
def heuristic(u, v):
|
|
103
|
+
return 0
|
|
104
|
+
|
|
105
|
+
weight = _weight_function(G, weight)
|
|
106
|
+
|
|
107
|
+
G_succ = G._adj # For speed-up (and works for both directed and undirected graphs)
|
|
108
|
+
|
|
109
|
+
# The queue stores priority, node, cost to reach, and parent.
|
|
110
|
+
# Uses Python heapq to keep in priority order.
|
|
111
|
+
# Add a counter to the queue to prevent the underlying heap from
|
|
112
|
+
# attempting to compare the nodes themselves. The hash breaks ties in the
|
|
113
|
+
# priority and is guaranteed unique for all nodes in the graph.
|
|
114
|
+
c = count()
|
|
115
|
+
queue = [(0, next(c), source, 0, None)]
|
|
116
|
+
|
|
117
|
+
# Maps enqueued nodes to distance of discovered paths and the
|
|
118
|
+
# computed heuristics to target. We avoid computing the heuristics
|
|
119
|
+
# more than once and inserting the node into the queue too many times.
|
|
120
|
+
enqueued = {}
|
|
121
|
+
# Maps explored nodes to parent closest to the source.
|
|
122
|
+
explored = {}
|
|
123
|
+
|
|
124
|
+
while queue:
|
|
125
|
+
# Pop the smallest item from queue.
|
|
126
|
+
_, __, curnode, dist, parent = heappop(queue)
|
|
127
|
+
|
|
128
|
+
if curnode == target:
|
|
129
|
+
path = [curnode]
|
|
130
|
+
node = parent
|
|
131
|
+
while node is not None:
|
|
132
|
+
path.append(node)
|
|
133
|
+
node = explored[node]
|
|
134
|
+
path.reverse()
|
|
135
|
+
return path
|
|
136
|
+
|
|
137
|
+
if curnode in explored:
|
|
138
|
+
# Do not override the parent of starting node
|
|
139
|
+
if explored[curnode] is None:
|
|
140
|
+
continue
|
|
141
|
+
|
|
142
|
+
# Skip bad paths that were enqueued before finding a better one
|
|
143
|
+
qcost, h = enqueued[curnode]
|
|
144
|
+
if qcost < dist:
|
|
145
|
+
continue
|
|
146
|
+
|
|
147
|
+
explored[curnode] = parent
|
|
148
|
+
|
|
149
|
+
for neighbor, w in G_succ[curnode].items():
|
|
150
|
+
cost = weight(curnode, neighbor, w)
|
|
151
|
+
if cost is None:
|
|
152
|
+
continue
|
|
153
|
+
ncost = dist + cost
|
|
154
|
+
if neighbor in enqueued:
|
|
155
|
+
qcost, h = enqueued[neighbor]
|
|
156
|
+
# if qcost <= ncost, a less costly path from the
|
|
157
|
+
# neighbor to the source was already determined.
|
|
158
|
+
# Therefore, we won't attempt to push this neighbor
|
|
159
|
+
# to the queue
|
|
160
|
+
if qcost <= ncost:
|
|
161
|
+
continue
|
|
162
|
+
else:
|
|
163
|
+
h = heuristic(neighbor, target)
|
|
164
|
+
|
|
165
|
+
if cutoff and ncost + h > cutoff:
|
|
166
|
+
continue
|
|
167
|
+
|
|
168
|
+
enqueued[neighbor] = ncost, h
|
|
169
|
+
heappush(queue, (ncost + h, next(c), neighbor, ncost, curnode))
|
|
170
|
+
|
|
171
|
+
raise nx.NetworkXNoPath(f"Node {target} not reachable from {source}")
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
@nx._dispatchable(edge_attrs="weight", preserve_node_attrs="heuristic")
|
|
175
|
+
def astar_path_length(
|
|
176
|
+
G, source, target, heuristic=None, weight="weight", *, cutoff=None
|
|
177
|
+
):
|
|
178
|
+
"""Returns the length of the shortest path between source and target using
|
|
179
|
+
the A* ("A-star") algorithm.
|
|
180
|
+
|
|
181
|
+
Parameters
|
|
182
|
+
----------
|
|
183
|
+
G : NetworkX graph
|
|
184
|
+
|
|
185
|
+
source : node
|
|
186
|
+
Starting node for path
|
|
187
|
+
|
|
188
|
+
target : node
|
|
189
|
+
Ending node for path
|
|
190
|
+
|
|
191
|
+
heuristic : function
|
|
192
|
+
A function to evaluate the estimate of the distance
|
|
193
|
+
from the a node to the target. The function takes
|
|
194
|
+
two nodes arguments and must return a number.
|
|
195
|
+
If the heuristic is inadmissible (if it might
|
|
196
|
+
overestimate the cost of reaching the goal from a node),
|
|
197
|
+
the result may not be a shortest path.
|
|
198
|
+
The algorithm does not support updating heuristic
|
|
199
|
+
values for the same node due to caching the first
|
|
200
|
+
heuristic calculation per node.
|
|
201
|
+
|
|
202
|
+
weight : string or function
|
|
203
|
+
If this is a string, then edge weights will be accessed via the
|
|
204
|
+
edge attribute with this key (that is, the weight of the edge
|
|
205
|
+
joining `u` to `v` will be ``G.edges[u, v][weight]``). If no
|
|
206
|
+
such edge attribute exists, the weight of the edge is assumed to
|
|
207
|
+
be one.
|
|
208
|
+
If this is a function, the weight of an edge is the value
|
|
209
|
+
returned by the function. The function must accept exactly three
|
|
210
|
+
positional arguments: the two endpoints of an edge and the
|
|
211
|
+
dictionary of edge attributes for that edge. The function must
|
|
212
|
+
return a number or None to indicate a hidden edge.
|
|
213
|
+
|
|
214
|
+
cutoff : float, optional
|
|
215
|
+
If this is provided, the search will be bounded to this value. I.e. if
|
|
216
|
+
the evaluation function surpasses this value for a node n, the node will not
|
|
217
|
+
be expanded further and will be ignored. More formally, let h'(n) be the
|
|
218
|
+
heuristic function, and g(n) be the cost of reaching n from the source node. Then,
|
|
219
|
+
if g(n) + h'(n) > cutoff, the node will not be explored further.
|
|
220
|
+
Note that if the heuristic is inadmissible, it is possible that paths
|
|
221
|
+
are ignored even though they satisfy the cutoff.
|
|
222
|
+
|
|
223
|
+
Raises
|
|
224
|
+
------
|
|
225
|
+
NetworkXNoPath
|
|
226
|
+
If no path exists between source and target.
|
|
227
|
+
|
|
228
|
+
See Also
|
|
229
|
+
--------
|
|
230
|
+
astar_path
|
|
231
|
+
|
|
232
|
+
"""
|
|
233
|
+
if source not in G or target not in G:
|
|
234
|
+
msg = f"Either source {source} or target {target} is not in G"
|
|
235
|
+
raise nx.NodeNotFound(msg)
|
|
236
|
+
|
|
237
|
+
weight = _weight_function(G, weight)
|
|
238
|
+
path = astar_path(G, source, target, heuristic, weight, cutoff=cutoff)
|
|
239
|
+
return sum(weight(u, v, G[u][v]) for u, v in zip(path[:-1], path[1:]))
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
"""Floyd-Warshall algorithm for shortest paths."""
|
|
2
|
+
|
|
3
|
+
import networkx as nx
|
|
4
|
+
|
|
5
|
+
__all__ = [
|
|
6
|
+
"floyd_warshall",
|
|
7
|
+
"floyd_warshall_predecessor_and_distance",
|
|
8
|
+
"reconstruct_path",
|
|
9
|
+
"floyd_warshall_numpy",
|
|
10
|
+
]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
@nx._dispatchable(edge_attrs="weight")
|
|
14
|
+
def floyd_warshall_numpy(G, nodelist=None, weight="weight"):
|
|
15
|
+
"""Find all-pairs shortest path lengths using Floyd's algorithm.
|
|
16
|
+
|
|
17
|
+
This algorithm for finding shortest paths takes advantage of
|
|
18
|
+
matrix representations of a graph and works well for dense
|
|
19
|
+
graphs where all-pairs shortest path lengths are desired.
|
|
20
|
+
The results are returned as a NumPy array, distance[i, j],
|
|
21
|
+
where i and j are the indexes of two nodes in nodelist.
|
|
22
|
+
The entry distance[i, j] is the distance along a shortest
|
|
23
|
+
path from i to j. If no path exists the distance is Inf.
|
|
24
|
+
|
|
25
|
+
Parameters
|
|
26
|
+
----------
|
|
27
|
+
G : NetworkX graph
|
|
28
|
+
|
|
29
|
+
nodelist : list, optional (default=G.nodes)
|
|
30
|
+
The rows and columns are ordered by the nodes in nodelist.
|
|
31
|
+
If nodelist is None then the ordering is produced by G.nodes.
|
|
32
|
+
Nodelist should include all nodes in G.
|
|
33
|
+
|
|
34
|
+
weight: string, optional (default='weight')
|
|
35
|
+
Edge data key corresponding to the edge weight.
|
|
36
|
+
|
|
37
|
+
Returns
|
|
38
|
+
-------
|
|
39
|
+
distance : 2D numpy.ndarray
|
|
40
|
+
A numpy array of shortest path distances between nodes.
|
|
41
|
+
If there is no path between two nodes the value is Inf.
|
|
42
|
+
|
|
43
|
+
Examples
|
|
44
|
+
--------
|
|
45
|
+
>>> G = nx.DiGraph()
|
|
46
|
+
>>> G.add_weighted_edges_from(
|
|
47
|
+
... [(0, 1, 5), (1, 2, 2), (2, 3, -3), (1, 3, 10), (3, 2, 8)]
|
|
48
|
+
... )
|
|
49
|
+
>>> nx.floyd_warshall_numpy(G)
|
|
50
|
+
array([[ 0., 5., 7., 4.],
|
|
51
|
+
[inf, 0., 2., -1.],
|
|
52
|
+
[inf, inf, 0., -3.],
|
|
53
|
+
[inf, inf, 8., 0.]])
|
|
54
|
+
|
|
55
|
+
Notes
|
|
56
|
+
-----
|
|
57
|
+
Floyd's algorithm is appropriate for finding shortest paths in
|
|
58
|
+
dense graphs or graphs with negative weights when Dijkstra's
|
|
59
|
+
algorithm fails. This algorithm can still fail if there are negative
|
|
60
|
+
cycles. It has running time $O(n^3)$ with running space of $O(n^2)$.
|
|
61
|
+
|
|
62
|
+
Raises
|
|
63
|
+
------
|
|
64
|
+
NetworkXError
|
|
65
|
+
If nodelist is not a list of the nodes in G.
|
|
66
|
+
"""
|
|
67
|
+
import numpy as np
|
|
68
|
+
|
|
69
|
+
if nodelist is not None:
|
|
70
|
+
if not (len(nodelist) == len(G) == len(set(nodelist))):
|
|
71
|
+
raise nx.NetworkXError(
|
|
72
|
+
"nodelist must contain every node in G with no repeats."
|
|
73
|
+
"If you wanted a subgraph of G use G.subgraph(nodelist)"
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
# To handle cases when an edge has weight=0, we must make sure that
|
|
77
|
+
# nonedges are not given the value 0 as well.
|
|
78
|
+
A = nx.to_numpy_array(
|
|
79
|
+
G, nodelist, multigraph_weight=min, weight=weight, nonedge=np.inf
|
|
80
|
+
)
|
|
81
|
+
n, m = A.shape
|
|
82
|
+
np.fill_diagonal(A, 0) # diagonal elements should be zero
|
|
83
|
+
for i in range(n):
|
|
84
|
+
# The second term has the same shape as A due to broadcasting
|
|
85
|
+
A = np.minimum(A, A[i, :][np.newaxis, :] + A[:, i][:, np.newaxis])
|
|
86
|
+
return A
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
@nx._dispatchable(edge_attrs="weight")
|
|
90
|
+
def floyd_warshall_predecessor_and_distance(G, weight="weight"):
|
|
91
|
+
"""Find all-pairs shortest path lengths using Floyd's algorithm.
|
|
92
|
+
|
|
93
|
+
Parameters
|
|
94
|
+
----------
|
|
95
|
+
G : NetworkX graph
|
|
96
|
+
|
|
97
|
+
weight: string, optional (default= 'weight')
|
|
98
|
+
Edge data key corresponding to the edge weight.
|
|
99
|
+
|
|
100
|
+
Returns
|
|
101
|
+
-------
|
|
102
|
+
predecessor,distance : dictionaries
|
|
103
|
+
Dictionaries, keyed by source and target, of predecessors and distances
|
|
104
|
+
in the shortest path.
|
|
105
|
+
|
|
106
|
+
Examples
|
|
107
|
+
--------
|
|
108
|
+
>>> G = nx.DiGraph()
|
|
109
|
+
>>> G.add_weighted_edges_from(
|
|
110
|
+
... [
|
|
111
|
+
... ("s", "u", 10),
|
|
112
|
+
... ("s", "x", 5),
|
|
113
|
+
... ("u", "v", 1),
|
|
114
|
+
... ("u", "x", 2),
|
|
115
|
+
... ("v", "y", 1),
|
|
116
|
+
... ("x", "u", 3),
|
|
117
|
+
... ("x", "v", 5),
|
|
118
|
+
... ("x", "y", 2),
|
|
119
|
+
... ("y", "s", 7),
|
|
120
|
+
... ("y", "v", 6),
|
|
121
|
+
... ]
|
|
122
|
+
... )
|
|
123
|
+
>>> predecessors, _ = nx.floyd_warshall_predecessor_and_distance(G)
|
|
124
|
+
>>> print(nx.reconstruct_path("s", "v", predecessors))
|
|
125
|
+
['s', 'x', 'u', 'v']
|
|
126
|
+
|
|
127
|
+
Notes
|
|
128
|
+
-----
|
|
129
|
+
Floyd's algorithm is appropriate for finding shortest paths
|
|
130
|
+
in dense graphs or graphs with negative weights when Dijkstra's algorithm
|
|
131
|
+
fails. This algorithm can still fail if there are negative cycles.
|
|
132
|
+
It has running time $O(n^3)$ with running space of $O(n^2)$.
|
|
133
|
+
|
|
134
|
+
See Also
|
|
135
|
+
--------
|
|
136
|
+
floyd_warshall
|
|
137
|
+
floyd_warshall_numpy
|
|
138
|
+
all_pairs_shortest_path
|
|
139
|
+
all_pairs_shortest_path_length
|
|
140
|
+
"""
|
|
141
|
+
from collections import defaultdict
|
|
142
|
+
|
|
143
|
+
# dictionary-of-dictionaries representation for dist and pred
|
|
144
|
+
# use some defaultdict magick here
|
|
145
|
+
# for dist the default is the floating point inf value
|
|
146
|
+
dist = defaultdict(lambda: defaultdict(lambda: float("inf")))
|
|
147
|
+
for u in G:
|
|
148
|
+
dist[u][u] = 0
|
|
149
|
+
pred = defaultdict(dict)
|
|
150
|
+
# initialize path distance dictionary to be the adjacency matrix
|
|
151
|
+
# also set the distance to self to 0 (zero diagonal)
|
|
152
|
+
undirected = not G.is_directed()
|
|
153
|
+
for u, v, d in G.edges(data=True):
|
|
154
|
+
e_weight = d.get(weight, 1.0)
|
|
155
|
+
dist[u][v] = min(e_weight, dist[u][v])
|
|
156
|
+
pred[u][v] = u
|
|
157
|
+
if undirected:
|
|
158
|
+
dist[v][u] = min(e_weight, dist[v][u])
|
|
159
|
+
pred[v][u] = v
|
|
160
|
+
for w in G:
|
|
161
|
+
dist_w = dist[w] # save recomputation
|
|
162
|
+
for u in G:
|
|
163
|
+
dist_u = dist[u] # save recomputation
|
|
164
|
+
for v in G:
|
|
165
|
+
d = dist_u[w] + dist_w[v]
|
|
166
|
+
if dist_u[v] > d:
|
|
167
|
+
dist_u[v] = d
|
|
168
|
+
pred[u][v] = pred[w][v]
|
|
169
|
+
return dict(pred), dict(dist)
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
@nx._dispatchable(graphs=None)
|
|
173
|
+
def reconstruct_path(source, target, predecessors):
|
|
174
|
+
"""Reconstruct a path from source to target using the predecessors
|
|
175
|
+
dict as returned by floyd_warshall_predecessor_and_distance
|
|
176
|
+
|
|
177
|
+
Parameters
|
|
178
|
+
----------
|
|
179
|
+
source : node
|
|
180
|
+
Starting node for path
|
|
181
|
+
|
|
182
|
+
target : node
|
|
183
|
+
Ending node for path
|
|
184
|
+
|
|
185
|
+
predecessors: dictionary
|
|
186
|
+
Dictionary, keyed by source and target, of predecessors in the
|
|
187
|
+
shortest path, as returned by floyd_warshall_predecessor_and_distance
|
|
188
|
+
|
|
189
|
+
Returns
|
|
190
|
+
-------
|
|
191
|
+
path : list
|
|
192
|
+
A list of nodes containing the shortest path from source to target
|
|
193
|
+
|
|
194
|
+
If source and target are the same, an empty list is returned
|
|
195
|
+
|
|
196
|
+
Notes
|
|
197
|
+
-----
|
|
198
|
+
This function is meant to give more applicability to the
|
|
199
|
+
floyd_warshall_predecessor_and_distance function
|
|
200
|
+
|
|
201
|
+
See Also
|
|
202
|
+
--------
|
|
203
|
+
floyd_warshall_predecessor_and_distance
|
|
204
|
+
"""
|
|
205
|
+
if source == target:
|
|
206
|
+
return []
|
|
207
|
+
prev = predecessors[source]
|
|
208
|
+
curr = prev[target]
|
|
209
|
+
path = [target, curr]
|
|
210
|
+
while curr != source:
|
|
211
|
+
curr = prev[curr]
|
|
212
|
+
path.append(curr)
|
|
213
|
+
return list(reversed(path))
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
@nx._dispatchable(edge_attrs="weight")
|
|
217
|
+
def floyd_warshall(G, weight="weight"):
|
|
218
|
+
"""Find all-pairs shortest path lengths using Floyd's algorithm.
|
|
219
|
+
|
|
220
|
+
Parameters
|
|
221
|
+
----------
|
|
222
|
+
G : NetworkX graph
|
|
223
|
+
|
|
224
|
+
weight: string, optional (default= 'weight')
|
|
225
|
+
Edge data key corresponding to the edge weight.
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
Returns
|
|
229
|
+
-------
|
|
230
|
+
distance : dict
|
|
231
|
+
A dictionary, keyed by source and target, of shortest paths distances
|
|
232
|
+
between nodes.
|
|
233
|
+
|
|
234
|
+
Examples
|
|
235
|
+
--------
|
|
236
|
+
>>> from pprint import pprint
|
|
237
|
+
>>> G = nx.DiGraph()
|
|
238
|
+
>>> G.add_weighted_edges_from(
|
|
239
|
+
... [(0, 1, 5), (1, 2, 2), (2, 3, -3), (1, 3, 10), (3, 2, 8)]
|
|
240
|
+
... )
|
|
241
|
+
>>> fw = nx.floyd_warshall(G, weight="weight")
|
|
242
|
+
>>> results = {a: dict(b) for a, b in fw.items()}
|
|
243
|
+
>>> pprint(results)
|
|
244
|
+
{0: {0: 0, 1: 5, 2: 7, 3: 4},
|
|
245
|
+
1: {0: inf, 1: 0, 2: 2, 3: -1},
|
|
246
|
+
2: {0: inf, 1: inf, 2: 0, 3: -3},
|
|
247
|
+
3: {0: inf, 1: inf, 2: 8, 3: 0}}
|
|
248
|
+
|
|
249
|
+
Notes
|
|
250
|
+
-----
|
|
251
|
+
Floyd's algorithm is appropriate for finding shortest paths
|
|
252
|
+
in dense graphs or graphs with negative weights when Dijkstra's algorithm
|
|
253
|
+
fails. This algorithm can still fail if there are negative cycles.
|
|
254
|
+
It has running time $O(n^3)$ with running space of $O(n^2)$.
|
|
255
|
+
|
|
256
|
+
See Also
|
|
257
|
+
--------
|
|
258
|
+
floyd_warshall_predecessor_and_distance
|
|
259
|
+
floyd_warshall_numpy
|
|
260
|
+
all_pairs_shortest_path
|
|
261
|
+
all_pairs_shortest_path_length
|
|
262
|
+
"""
|
|
263
|
+
# could make this its own function to reduce memory costs
|
|
264
|
+
return floyd_warshall_predecessor_and_distance(G, weight=weight)[1]
|