Python-EasyGraph 1.6__tar.gz → 1.6.1__tar.gz
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.
- {python_easygraph-1.6/Python_EasyGraph.egg-info → python_easygraph-1.6.1}/PKG-INFO +5 -3
- {python_easygraph-1.6 → python_easygraph-1.6.1/Python_EasyGraph.egg-info}/PKG-INFO +5 -3
- {python_easygraph-1.6 → python_easygraph-1.6.1}/Python_EasyGraph.egg-info/SOURCES.txt +2 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/Python_EasyGraph.egg-info/requires.txt +1 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/README.md +3 -2
- {python_easygraph-1.6 → python_easygraph-1.6.1}/cpp_easygraph/cpp_easygraph.cpp +3 -0
- python_easygraph-1.6.1/cpp_easygraph/functions/path/average_shortest_path_length.cpp +148 -0
- python_easygraph-1.6.1/cpp_easygraph/functions/path/diameter.cpp +207 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/cpp_easygraph/functions/path/mst.cpp +146 -1
- {python_easygraph-1.6 → python_easygraph-1.6.1}/cpp_easygraph/functions/path/mst.h +1 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/cpp_easygraph/functions/path/path.cpp +77 -40
- {python_easygraph-1.6 → python_easygraph-1.6.1}/cpp_easygraph/functions/path/path.h +3 -1
- {python_easygraph-1.6 → python_easygraph-1.6.1}/cpp_easygraph/functions/structural_holes/evaluation.cpp +78 -242
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/path/average_shortest_path_length.py +2 -1
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/path/diameter.py +2 -1
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/path/mst.py +1 -1
- {python_easygraph-1.6 → python_easygraph-1.6.1}/setup.py +2 -1
- {python_easygraph-1.6 → python_easygraph-1.6.1}/CMakeLists.txt +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/LICENSE +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/MANIFEST.in +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/Python_EasyGraph.egg-info/dependency_links.txt +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/Python_EasyGraph.egg-info/top_level.txt +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/README.rst +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/cpp_easygraph/CMakeLists.txt +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/cpp_easygraph/classes/__init__.h +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/cpp_easygraph/classes/coo_graph.h +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/cpp_easygraph/classes/csr_graph.h +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/cpp_easygraph/classes/directed_graph.cpp +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/cpp_easygraph/classes/directed_graph.h +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/cpp_easygraph/classes/graph.cpp +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/cpp_easygraph/classes/graph.h +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/cpp_easygraph/classes/linkgraph.h +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/cpp_easygraph/classes/operation.cpp +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/cpp_easygraph/classes/operation.h +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/cpp_easygraph/classes/segment_tree.cpp +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/cpp_easygraph/common/common.cpp +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/cpp_easygraph/common/common.h +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/cpp_easygraph/common/utils.cpp +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/cpp_easygraph/common/utils.h +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/cpp_easygraph/functions/__init__.h +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/cpp_easygraph/functions/basic/__init__.h +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/cpp_easygraph/functions/basic/avg_degree.cpp +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/cpp_easygraph/functions/basic/avg_degree.h +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/cpp_easygraph/functions/basic/cluster.cpp +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/cpp_easygraph/functions/basic/cluster.h +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/cpp_easygraph/functions/centrality/__init__.h +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/cpp_easygraph/functions/centrality/betweenness.cpp +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/cpp_easygraph/functions/centrality/centrality.h +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/cpp_easygraph/functions/centrality/closeness.cpp +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/cpp_easygraph/functions/centrality/degree.cpp +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/cpp_easygraph/functions/centrality/eigenvector.cpp +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/cpp_easygraph/functions/centrality/katz_centrality.cpp +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/cpp_easygraph/functions/components/__init__.h +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/cpp_easygraph/functions/components/biconnected.cpp +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/cpp_easygraph/functions/components/biconnected.h +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/cpp_easygraph/functions/components/connected.cpp +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/cpp_easygraph/functions/components/connected.h +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/cpp_easygraph/functions/components/strongly_connected.cpp +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/cpp_easygraph/functions/components/strongly_connected.h +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/cpp_easygraph/functions/cores/__init__.h +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/cpp_easygraph/functions/cores/k_cores.cpp +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/cpp_easygraph/functions/cores/k_cores.h +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/cpp_easygraph/functions/pagerank/__init__.h +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/cpp_easygraph/functions/pagerank/pagerank.cpp +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/cpp_easygraph/functions/pagerank/pagerank.h +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/cpp_easygraph/functions/path/__init__.h +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/cpp_easygraph/functions/structural_holes/__init__.h +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/cpp_easygraph/functions/structural_holes/evaluation.h +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/__init__.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/_global.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/classes/__init__.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/classes/base.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/classes/directed_graph.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/classes/directed_multigraph.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/classes/graph.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/classes/graphviews.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/classes/hypergraph.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/classes/multigraph.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/classes/operation.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/classes/test_base_graph_class.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/classes/tests/__init__.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/classes/tests/test_base.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/classes/tests/test_directed_graph.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/classes/tests/test_graph.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/classes/tests/test_graphV2.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/classes/tests/test_hypergraph.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/classes/tests/test_multidigraph.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/classes/tests/test_multigraph.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/classes/tests/test_operation.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/convert.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/datapipe/__init__.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/datapipe/common.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/datapipe/loader.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/datapipe/normalize.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/datasets/__init__.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/datasets/amazon_photo.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/datasets/arxiv.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/datasets/citation_graph.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/datasets/coauthor.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/datasets/dynamic/__init__.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/datasets/dynamic/email_enron.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/datasets/dynamic/email_eu.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/datasets/dynamic/hospital_lyon.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/datasets/dynamic/load_dataset.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/datasets/facebook_ego.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/datasets/flickr.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/datasets/get_sample_graph.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/datasets/github.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/datasets/gnn_benchmark.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/datasets/graph_dataset_base.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/datasets/hypergraph/House_Committees.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/datasets/hypergraph/Yelp.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/datasets/hypergraph/__init__.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/datasets/hypergraph/_global.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/datasets/hypergraph/cat_edge_Cooking.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/datasets/hypergraph/coauthorship.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/datasets/hypergraph/cocitation.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/datasets/hypergraph/contact_primary_school.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/datasets/hypergraph/cooking_200.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/datasets/hypergraph/hypergraph_dataset_base.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/datasets/hypergraph/loadDeepSetDatasets.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/datasets/hypergraph/mathoverflow_answers.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/datasets/hypergraph/senate_committees.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/datasets/hypergraph/trivago_clicks.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/datasets/hypergraph/walmart_trips.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/datasets/karate.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/datasets/ppi.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/datasets/reddit.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/datasets/roadnet.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/datasets/twitter_ego.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/datasets/utils.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/datasets/web_google.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/datasets/wiki_topcats.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/exception.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/experiments/__init__.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/experiments/base.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/experiments/hypergraphs/__init__.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/experiments/hypergraphs/hypergraph.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/experiments/vertex_classification.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/__init__.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/basic/__init__.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/basic/avg_degree.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/basic/cluster.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/basic/localassort.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/basic/predecessor_path_based.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/basic/tests/__init__.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/basic/tests/test_avg_degree.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/basic/tests/test_cluster.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/basic/tests/test_localassort.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/basic/tests/test_predecessor.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/centrality/__init__.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/centrality/betweenness.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/centrality/closeness.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/centrality/degree.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/centrality/ego_betweenness.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/centrality/eigenvector.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/centrality/flowbetweenness.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/centrality/katz_centrality.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/centrality/laplacian.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/centrality/pagerank.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/centrality/tests/__init__.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/centrality/tests/test_betweenness.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/centrality/tests/test_closeness.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/centrality/tests/test_degree.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/centrality/tests/test_egobetweenness.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/centrality/tests/test_flowbetweenness.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/centrality/tests/test_laplacian.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/centrality/tests/test_pagerank.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/community/LPA.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/community/__init__.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/community/ego_graph.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/community/localsearch.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/community/louvain.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/community/modularity.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/community/modularity_max_detection.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/community/motif.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/community/tests/__init__.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/community/tests/test_LPA.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/community/tests/test_LS.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/community/tests/test_ego_graph.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/community/tests/test_louvian.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/community/tests/test_modularity.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/community/tests/test_modularity_max_detection.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/community/tests/test_motif.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/components/__init__.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/components/biconnected.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/components/connected.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/components/strongly_connected.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/components/tests/__init__.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/components/tests/test_biconnected.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/components/tests/test_connected.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/components/tests/test_strongly_connected.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/components/tests/test_weakly_connected.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/components/weakly_connected.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/core/__init__.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/core/k_core.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/core/tests/__init__.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/core/tests/test_k_core.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/drawing/__init__.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/drawing/defaults.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/drawing/drawing.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/drawing/geometry.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/drawing/layout.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/drawing/plot.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/drawing/positioning.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/drawing/simulator.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/drawing/tests/__init__.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/drawing/tests/test_drawing.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/drawing/tests/test_geometry.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/drawing/tests/test_plot.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/drawing/tests/test_positioning.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/drawing/utils.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/graph_embedding/NOBE.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/graph_embedding/__init__.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/graph_embedding/deepwalk.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/graph_embedding/line.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/graph_embedding/net_emb_example_citeseer.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/graph_embedding/node2vec.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/graph_embedding/sdne.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/graph_embedding/tests/__init__.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/graph_embedding/tests/test_deepwalk.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/graph_embedding/tests/test_line.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/graph_embedding/tests/test_nobe.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/graph_embedding/tests/test_node2vec.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/graph_embedding/tests/test_sdne.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/graph_generator/RandomNetwork.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/graph_generator/__init__.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/graph_generator/classic.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/graph_generator/tests/__init__.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/graph_generator/tests/test_Random_Network.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/graph_generator/tests/test_classic.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/hypergraph/__init__.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/hypergraph/assortativity.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/hypergraph/centrality/__init__.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/hypergraph/centrality/cycle_ratio.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/hypergraph/centrality/degree.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/hypergraph/centrality/hypercoreness.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/hypergraph/centrality/s_centrality.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/hypergraph/centrality/vector_centrality.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/hypergraph/hypergraph_clustering.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/hypergraph/hypergraph_operation.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/hypergraph/null_model/__init__.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/hypergraph/null_model/hypergraph_classic.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/hypergraph/null_model/lattice.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/hypergraph/null_model/random.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/hypergraph/null_model/simple.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/hypergraph/null_model/tests/__init__.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/hypergraph/null_model/tests/test_classic.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/hypergraph/null_model/tests/test_lattice.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/hypergraph/null_model/tests/test_simple.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/hypergraph/null_model/uniform.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/hypergraph/tests/__init__.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/hypergraph/tests/test_assortativity.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/hypergraph/tests/test_centrality.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/hypergraph/tests/test_hypergraph_clustering.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/hypergraph/tests/test_hypergraph_operation.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/isolate.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/path/__init__.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/path/bridges.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/path/path.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/path/tests/__init__.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/path/tests/test_average_shortest_path_length.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/path/tests/test_bridges.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/path/tests/test_diameter.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/path/tests/test_mst.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/path/tests/test_path.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/structural_holes/AP_Greedy.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/structural_holes/HAM.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/structural_holes/HIS.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/structural_holes/ICC.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/structural_holes/MaxD.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/structural_holes/NOBE.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/structural_holes/SHII_metric.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/structural_holes/__init__.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/structural_holes/evaluation.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/structural_holes/maxBlock.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/structural_holes/metrics.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/structural_holes/weakTie.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/tests/__init__.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/functions/tests/test_isolate.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/ml_metrics/__init__.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/ml_metrics/base.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/ml_metrics/classification.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/ml_metrics/hypergraphs/__init__.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/ml_metrics/hypergraphs/hypergraph.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/model/__init__.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/model/hypergraphs/__init__.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/model/hypergraphs/dhcf.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/model/hypergraphs/dhne.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/model/hypergraphs/hgnn.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/model/hypergraphs/hgnnp.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/model/hypergraphs/hnhn.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/model/hypergraphs/hwnn.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/model/hypergraphs/hypergcn.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/model/hypergraphs/setgnn.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/model/hypergraphs/unignn.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/nn/__init__.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/nn/convs/__init__.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/nn/convs/common.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/nn/convs/hypergraphs/__init__.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/nn/convs/hypergraphs/dhcf_conv.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/nn/convs/hypergraphs/halfnlh_conv.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/nn/convs/hypergraphs/hgnn_conv.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/nn/convs/hypergraphs/hgnnp_conv.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/nn/convs/hypergraphs/hnhn_conv.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/nn/convs/hypergraphs/hwnn_conv.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/nn/convs/hypergraphs/hypergcn_conv.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/nn/convs/hypergraphs/unignn_conv.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/nn/convs/pma.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/nn/loss.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/nn/regularization.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/nn/tests/__init__.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/nn/tests/test_gatconv.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/nn/tests/test_gcnconv.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/nn/tests/test_graphsageconv.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/nn/tests/test_regularization.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/readwrite/__init__.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/readwrite/edgelist.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/readwrite/gexf.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/readwrite/gml.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/readwrite/graphml.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/readwrite/graphviz.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/readwrite/json_graph/__init__.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/readwrite/json_graph/node_link.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/readwrite/pajek.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/readwrite/pickle.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/readwrite/tests/__init__.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/readwrite/tests/test_edgelist.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/readwrite/tests/test_gexf.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/readwrite/tests/test_gml.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/readwrite/tests/test_graphml.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/readwrite/tests/test_graphviz.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/readwrite/tests/test_pajek.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/readwrite/tests/test_pickle.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/readwrite/tests/test_ucinet.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/readwrite/ucinet.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/tests/__init__.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/tests/script_test_cpp_easygraph.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/tests/teddy_test_cpp_easygraph_sanity_check.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/tests/test_convert.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/tests/test_cpp_easygraph.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/tests/test_hif.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/utils/HIF.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/utils/__init__.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/utils/alias.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/utils/convert_class.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/utils/convert_to_matrix.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/utils/decorators.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/utils/download.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/utils/exception.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/utils/index_of_node.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/utils/logging.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/utils/mapped_queue.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/utils/misc.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/utils/relabel.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/utils/sparse.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/easygraph/utils/type_change.py +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/pyproject.toml +0 -0
- {python_easygraph-1.6 → python_easygraph-1.6.1}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: Python-EasyGraph
|
|
3
|
-
Version: 1.6
|
|
3
|
+
Version: 1.6.1
|
|
4
4
|
Summary: Easy Graph
|
|
5
5
|
Home-page: https://github.com/easy-graph/Easy-Graph
|
|
6
6
|
Author: Fudan DataNET Group
|
|
@@ -36,6 +36,7 @@ Requires-Dist: pandas>=1.1.0; python_version >= "3.8" and python_version < "3.14
|
|
|
36
36
|
Requires-Dist: matplotlib
|
|
37
37
|
Requires-Dist: requests
|
|
38
38
|
Requires-Dist: optuna
|
|
39
|
+
Requires-Dist: fastjsonschema
|
|
39
40
|
Provides-Extra: torch
|
|
40
41
|
Requires-Dist: torch>=2.0; extra == "torch"
|
|
41
42
|
Requires-Dist: fastjsonschema; extra == "torch"
|
|
@@ -117,10 +118,11 @@ It bridges the gap between EasyGraph and higher-order relationships. EasyHypergr
|
|
|
117
118
|
- [11-04-2023] [EasyGraph:多功能、跨平台、高效率的跨学科网络分析库 (in Chinese)](https://swarma.org/?p=46252)
|
|
118
119
|
|
|
119
120
|
## 🚀 Releases & Milestones
|
|
120
|
-
- [
|
|
121
|
+
- [02-01-2026] EasyGraph **v1.6** released (OpenMP-powered functions for large network analysis)
|
|
122
|
+
- **[01-16-2026] 🎉 1M Downloads! Thanks to our amazing community!**
|
|
123
|
+
- [01-01-2026] EasyGraph **v1.5.3** released ([The Hypergraph Interchange Format (HIF) standard](https://github.com/HIF-org/HIF-standard))
|
|
121
124
|
- [11-23-2025] EasyGraph **v1.5.2** released (LS algorithm for effective community detection)
|
|
122
125
|
- [10-11-2025] EasyGraph **v1.5.1** released (Python 3.14 supported)
|
|
123
|
-
- **[09-29-2025] 🎉 900K+ Downloads! Thanks to our amazing community!**
|
|
124
126
|
- [07-27-2025] EasyGraph **v1.5** released (This version integrates the HWNN model and supports 11 representative network datasets)
|
|
125
127
|
- **[06-29-2025] 🎉 800K+ Downloads!**
|
|
126
128
|
- [11-22-2024] EasyGraph **v1.4.1** released (Python 3.13 supported)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: Python-EasyGraph
|
|
3
|
-
Version: 1.6
|
|
3
|
+
Version: 1.6.1
|
|
4
4
|
Summary: Easy Graph
|
|
5
5
|
Home-page: https://github.com/easy-graph/Easy-Graph
|
|
6
6
|
Author: Fudan DataNET Group
|
|
@@ -36,6 +36,7 @@ Requires-Dist: pandas>=1.1.0; python_version >= "3.8" and python_version < "3.14
|
|
|
36
36
|
Requires-Dist: matplotlib
|
|
37
37
|
Requires-Dist: requests
|
|
38
38
|
Requires-Dist: optuna
|
|
39
|
+
Requires-Dist: fastjsonschema
|
|
39
40
|
Provides-Extra: torch
|
|
40
41
|
Requires-Dist: torch>=2.0; extra == "torch"
|
|
41
42
|
Requires-Dist: fastjsonschema; extra == "torch"
|
|
@@ -117,10 +118,11 @@ It bridges the gap between EasyGraph and higher-order relationships. EasyHypergr
|
|
|
117
118
|
- [11-04-2023] [EasyGraph:多功能、跨平台、高效率的跨学科网络分析库 (in Chinese)](https://swarma.org/?p=46252)
|
|
118
119
|
|
|
119
120
|
## 🚀 Releases & Milestones
|
|
120
|
-
- [
|
|
121
|
+
- [02-01-2026] EasyGraph **v1.6** released (OpenMP-powered functions for large network analysis)
|
|
122
|
+
- **[01-16-2026] 🎉 1M Downloads! Thanks to our amazing community!**
|
|
123
|
+
- [01-01-2026] EasyGraph **v1.5.3** released ([The Hypergraph Interchange Format (HIF) standard](https://github.com/HIF-org/HIF-standard))
|
|
121
124
|
- [11-23-2025] EasyGraph **v1.5.2** released (LS algorithm for effective community detection)
|
|
122
125
|
- [10-11-2025] EasyGraph **v1.5.1** released (Python 3.14 supported)
|
|
123
|
-
- **[09-29-2025] 🎉 900K+ Downloads! Thanks to our amazing community!**
|
|
124
126
|
- [07-27-2025] EasyGraph **v1.5** released (This version integrates the HWNN model and supports 11 representative network datasets)
|
|
125
127
|
- **[06-29-2025] 🎉 800K+ Downloads!**
|
|
126
128
|
- [11-22-2024] EasyGraph **v1.4.1** released (Python 3.13 supported)
|
|
@@ -54,6 +54,8 @@ cpp_easygraph/functions/pagerank/__init__.h
|
|
|
54
54
|
cpp_easygraph/functions/pagerank/pagerank.cpp
|
|
55
55
|
cpp_easygraph/functions/pagerank/pagerank.h
|
|
56
56
|
cpp_easygraph/functions/path/__init__.h
|
|
57
|
+
cpp_easygraph/functions/path/average_shortest_path_length.cpp
|
|
58
|
+
cpp_easygraph/functions/path/diameter.cpp
|
|
57
59
|
cpp_easygraph/functions/path/mst.cpp
|
|
58
60
|
cpp_easygraph/functions/path/mst.h
|
|
59
61
|
cpp_easygraph/functions/path/path.cpp
|
|
@@ -63,10 +63,11 @@ It bridges the gap between EasyGraph and higher-order relationships. EasyHypergr
|
|
|
63
63
|
- [11-04-2023] [EasyGraph:多功能、跨平台、高效率的跨学科网络分析库 (in Chinese)](https://swarma.org/?p=46252)
|
|
64
64
|
|
|
65
65
|
## 🚀 Releases & Milestones
|
|
66
|
-
- [
|
|
66
|
+
- [02-01-2026] EasyGraph **v1.6** released (OpenMP-powered functions for large network analysis)
|
|
67
|
+
- **[01-16-2026] 🎉 1M Downloads! Thanks to our amazing community!**
|
|
68
|
+
- [01-01-2026] EasyGraph **v1.5.3** released ([The Hypergraph Interchange Format (HIF) standard](https://github.com/HIF-org/HIF-standard))
|
|
67
69
|
- [11-23-2025] EasyGraph **v1.5.2** released (LS algorithm for effective community detection)
|
|
68
70
|
- [10-11-2025] EasyGraph **v1.5.1** released (Python 3.14 supported)
|
|
69
|
-
- **[09-29-2025] 🎉 900K+ Downloads! Thanks to our amazing community!**
|
|
70
71
|
- [07-27-2025] EasyGraph **v1.5** released (This version integrates the HWNN model and supports 11 representative network datasets)
|
|
71
72
|
- **[06-29-2025] 🎉 800K+ Downloads!**
|
|
72
73
|
- [11-22-2024] EasyGraph **v1.4.1** released (Python 3.13 supported)
|
|
@@ -100,6 +100,9 @@ PYBIND11_MODULE(cpp_easygraph, m) {
|
|
|
100
100
|
m.def("cpp_plain_bfs", &plain_bfs, py::arg("G"), py::arg("source"));
|
|
101
101
|
m.def("cpp_kruskal_mst_edges", &kruskal_mst_edges, py::arg("G"), py::arg("minimum") = true, py::arg("weight") = "weight", py::arg("data") = true, py::arg("ignore_nan") = false);
|
|
102
102
|
m.def("cpp_prim_mst_edges", &prim_mst_edges, py::arg("G"), py::arg("minimum") = true, py::arg("weight") = "weight", py::arg("data") = true, py::arg("ignore_nan") = false);
|
|
103
|
+
m.def("cpp_boruvka_mst_edges", &boruvka_mst_edges, py::arg("G"), py::arg("minimum") = true, py::arg("weight") = "weight", py::arg("data") = true, py::arg("ignore_nan") = false);
|
|
104
|
+
m.def("cpp_average_shortest_path_length", &average_shortest_path_length, py::arg("G"), py::arg("weight") = py::none(), py::arg("method") = py::none());
|
|
105
|
+
m.def("cpp_eccentricity", &eccentricity, py::arg("G"), py::arg("v") = py::none(), py::arg("sp") = py::none());
|
|
103
106
|
m.def("cpp_connected_components_undirected", &connected_component_undirected, py::arg("G"));
|
|
104
107
|
m.def("cpp_connected_components_directed", &connected_component_directed, py::arg("G"));
|
|
105
108
|
}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
#include "path.h"
|
|
2
|
+
|
|
3
|
+
#ifdef _OPENMP
|
|
4
|
+
#include <omp.h>
|
|
5
|
+
#endif
|
|
6
|
+
|
|
7
|
+
#include "../../classes/graph.h"
|
|
8
|
+
#include "../../common/utils.h"
|
|
9
|
+
#include "../../classes/linkgraph.h"
|
|
10
|
+
|
|
11
|
+
#include <vector>
|
|
12
|
+
#include <queue>
|
|
13
|
+
#include <limits>
|
|
14
|
+
#include <string>
|
|
15
|
+
|
|
16
|
+
double _bfs_sum(const Graph_L& G_l, int source) {
|
|
17
|
+
int N = G_l.n;
|
|
18
|
+
std::vector<int> dis(N + 1, -1);
|
|
19
|
+
std::queue<int> q;
|
|
20
|
+
|
|
21
|
+
dis[source] = 0;
|
|
22
|
+
q.push(source);
|
|
23
|
+
|
|
24
|
+
double sum = 0.0;
|
|
25
|
+
int visited_count = 0;
|
|
26
|
+
|
|
27
|
+
const std::vector<int>& head = G_l.head;
|
|
28
|
+
const std::vector<LinkEdge>& E = G_l.edges;
|
|
29
|
+
|
|
30
|
+
while (!q.empty()) {
|
|
31
|
+
int u = q.front();
|
|
32
|
+
q.pop();
|
|
33
|
+
sum += dis[u];
|
|
34
|
+
visited_count++;
|
|
35
|
+
|
|
36
|
+
for (int p = head[u]; p != -1; p = E[p].next) {
|
|
37
|
+
int v = E[p].to;
|
|
38
|
+
if (dis[v] == -1) {
|
|
39
|
+
dis[v] = dis[u] + 1;
|
|
40
|
+
q.push(v);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return (visited_count == N) ? sum : -1.0;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
double _dijkstra_sum(const Graph_L& G_l, int source) {
|
|
48
|
+
int N = G_l.n;
|
|
49
|
+
const double INF = std::numeric_limits<double>::infinity();
|
|
50
|
+
std::vector<double> dis(N + 1, INF);
|
|
51
|
+
std::priority_queue<std::pair<double, int>,
|
|
52
|
+
std::vector<std::pair<double, int>>,
|
|
53
|
+
std::greater<std::pair<double, int>>> pq;
|
|
54
|
+
|
|
55
|
+
dis[source] = 0.0;
|
|
56
|
+
pq.push({0.0, source});
|
|
57
|
+
|
|
58
|
+
double sum = 0.0;
|
|
59
|
+
int visited_count = 0;
|
|
60
|
+
|
|
61
|
+
const std::vector<int>& head = G_l.head;
|
|
62
|
+
const std::vector<LinkEdge>& E = G_l.edges;
|
|
63
|
+
|
|
64
|
+
while (!pq.empty()) {
|
|
65
|
+
auto top_node = pq.top();
|
|
66
|
+
double d = top_node.first;
|
|
67
|
+
int u = top_node.second;
|
|
68
|
+
pq.pop();
|
|
69
|
+
|
|
70
|
+
if (d > dis[u]) continue;
|
|
71
|
+
sum += d;
|
|
72
|
+
visited_count++;
|
|
73
|
+
|
|
74
|
+
for (int p = head[u]; p != -1; p = E[p].next) {
|
|
75
|
+
int v = E[p].to;
|
|
76
|
+
double w = static_cast<double>(E[p].w);
|
|
77
|
+
if (dis[u] + w < dis[v]) {
|
|
78
|
+
dis[v] = dis[u] + w;
|
|
79
|
+
pq.push({dis[v], v});
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
return (visited_count == N) ? sum : -1.0;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
py::object average_shortest_path_length(py::object G, py::object weight, py::object method) {
|
|
88
|
+
Graph& G_ = G.cast<Graph&>();
|
|
89
|
+
bool is_directed = G.attr("is_directed")().cast<bool>();
|
|
90
|
+
|
|
91
|
+
std::string weight_key = "";
|
|
92
|
+
if (!weight.is_none()) {
|
|
93
|
+
weight_key = weight.cast<std::string>();
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
std::string method_str;
|
|
97
|
+
if (method.is_none()) {
|
|
98
|
+
method_str = weight.is_none() ? "single_source_bfs" : "dijkstra";
|
|
99
|
+
} else {
|
|
100
|
+
method_str = method.cast<std::string>();
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
if(G_.linkgraph_dirty){
|
|
104
|
+
G_.linkgraph_structure = graph_to_linkgraph(G_, is_directed, weight_key, true, false);
|
|
105
|
+
G_.linkgraph_dirty = false;
|
|
106
|
+
}
|
|
107
|
+
const Graph_L& G_l = G_.linkgraph_structure;
|
|
108
|
+
|
|
109
|
+
int N = G_l.n;
|
|
110
|
+
if (N <= 1) return py::float_(0.0);
|
|
111
|
+
|
|
112
|
+
double total_sum = 0.0;
|
|
113
|
+
bool is_connected = true;
|
|
114
|
+
|
|
115
|
+
{
|
|
116
|
+
py::gil_scoped_release release;
|
|
117
|
+
|
|
118
|
+
#pragma omp parallel for reduction(+:total_sum) schedule(dynamic)
|
|
119
|
+
for (int i = 1; i <= N; i++) {
|
|
120
|
+
if (!is_connected) continue;
|
|
121
|
+
|
|
122
|
+
double local_sum = 0.0;
|
|
123
|
+
if (method_str == "single_source_bfs" || method_str == "unweighted") {
|
|
124
|
+
local_sum = _bfs_sum(G_l, i);
|
|
125
|
+
} else {
|
|
126
|
+
local_sum = _dijkstra_sum(G_l, i);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
if (local_sum < 0) {
|
|
130
|
+
#pragma omp critical
|
|
131
|
+
is_connected = false;
|
|
132
|
+
} else {
|
|
133
|
+
total_sum += local_sum;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
if (!is_connected) {
|
|
139
|
+
if (is_directed) {
|
|
140
|
+
throw py::value_error("Graph is not strongly connected.");
|
|
141
|
+
}
|
|
142
|
+
else {
|
|
143
|
+
throw py::value_error("Graph is not connected.");
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
return py::float_(total_sum / (static_cast<double>(N) * (N - 1)));
|
|
148
|
+
}
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
#include "path.h"
|
|
2
|
+
|
|
3
|
+
#ifdef _OPENMP
|
|
4
|
+
#include <omp.h>
|
|
5
|
+
#endif
|
|
6
|
+
|
|
7
|
+
#include "../../classes/graph.h"
|
|
8
|
+
#include "../../common/utils.h"
|
|
9
|
+
#include "../../classes/linkgraph.h"
|
|
10
|
+
|
|
11
|
+
#include <vector>
|
|
12
|
+
#include <queue>
|
|
13
|
+
#include <limits>
|
|
14
|
+
#include <string>
|
|
15
|
+
#include <pybind11/pybind11.h>
|
|
16
|
+
|
|
17
|
+
namespace py = pybind11;
|
|
18
|
+
|
|
19
|
+
double _bfs_eccentricity(const Graph_L& G_l, int source) {
|
|
20
|
+
int N = G_l.n;
|
|
21
|
+
std::vector<int> dis(N + 1, -1);
|
|
22
|
+
std::queue<int> q;
|
|
23
|
+
|
|
24
|
+
dis[source] = 0;
|
|
25
|
+
q.push(source);
|
|
26
|
+
|
|
27
|
+
double max_dist = 0.0;
|
|
28
|
+
int visited_count = 0;
|
|
29
|
+
|
|
30
|
+
const std::vector<int>& head = G_l.head;
|
|
31
|
+
const std::vector<LinkEdge>& E = G_l.edges;
|
|
32
|
+
|
|
33
|
+
while (!q.empty()) {
|
|
34
|
+
int u = q.front();
|
|
35
|
+
q.pop();
|
|
36
|
+
visited_count++;
|
|
37
|
+
|
|
38
|
+
if (dis[u] > max_dist) {
|
|
39
|
+
max_dist = dis[u];
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
for (int p = head[u]; p != -1; p = E[p].next) {
|
|
43
|
+
int v = E[p].to;
|
|
44
|
+
if (dis[v] == -1) {
|
|
45
|
+
dis[v] = dis[u] + 1;
|
|
46
|
+
q.push(v);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
return (visited_count == N) ? max_dist : -1.0;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
py::object eccentricity(py::object G, py::object v = py::none(), py::object sp = py::none()) {
|
|
56
|
+
Graph& G_ = G.cast<Graph&>();
|
|
57
|
+
|
|
58
|
+
bool is_directed = py::hasattr(G, "is_directed") ? G.attr("is_directed")().cast<bool>() : false;
|
|
59
|
+
|
|
60
|
+
int order = py::len(G.attr("nodes"));
|
|
61
|
+
|
|
62
|
+
if (!sp.is_none()) {
|
|
63
|
+
py::dict result;
|
|
64
|
+
py::dict sp_dict = sp.cast<py::dict>();
|
|
65
|
+
|
|
66
|
+
py::list nodes_to_check;
|
|
67
|
+
bool is_single = false;
|
|
68
|
+
|
|
69
|
+
if (v.is_none()) {
|
|
70
|
+
nodes_to_check = py::list(G.attr("nodes"));
|
|
71
|
+
} else if (py::isinstance<py::list>(v) || py::isinstance<py::tuple>(v) || py::isinstance<py::set>(v)) {
|
|
72
|
+
nodes_to_check = py::list(v);
|
|
73
|
+
} else {
|
|
74
|
+
nodes_to_check.append(v);
|
|
75
|
+
is_single = true;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
for (py::handle n : nodes_to_check) {
|
|
79
|
+
if (!sp_dict.contains(n)) {
|
|
80
|
+
throw py::type_error("Format of 'sp' is invalid.");
|
|
81
|
+
}
|
|
82
|
+
py::dict length_dict = sp_dict[n].cast<py::dict>();
|
|
83
|
+
if (py::len(length_dict) != order) {
|
|
84
|
+
std::string msg = is_directed ?
|
|
85
|
+
"Found infinite path length because the digraph is not strongly connected" :
|
|
86
|
+
"Found infinite path length because the graph is not connected";
|
|
87
|
+
throw py::value_error(msg);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
double max_val = 0.0;
|
|
91
|
+
for (auto item : length_dict) {
|
|
92
|
+
double val = item.second.cast<double>();
|
|
93
|
+
if (val > max_val) max_val = val;
|
|
94
|
+
}
|
|
95
|
+
result[n] = max_val;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
if (is_single) return result[v];
|
|
99
|
+
return result;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
if (G_.linkgraph_dirty) {
|
|
103
|
+
G_.linkgraph_structure = graph_to_linkgraph(G_, is_directed, "", true, false);
|
|
104
|
+
G_.linkgraph_dirty = false;
|
|
105
|
+
}
|
|
106
|
+
const Graph_L& G_l = G_.linkgraph_structure;
|
|
107
|
+
|
|
108
|
+
int N = G_l.n;
|
|
109
|
+
if (N == 0) return py::dict();
|
|
110
|
+
|
|
111
|
+
py::dict node_index;
|
|
112
|
+
std::vector<py::object> index_to_node_vec;
|
|
113
|
+
|
|
114
|
+
if (py::hasattr(G, "node_index")) {
|
|
115
|
+
node_index = G.attr("node_index").cast<py::dict>();
|
|
116
|
+
} else {
|
|
117
|
+
int idx = 0;
|
|
118
|
+
for (py::handle n : G.attr("nodes")) {
|
|
119
|
+
node_index[n] = py::cast(idx++);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
if (py::hasattr(G, "index_node")) {
|
|
124
|
+
py::object idx_n = G.attr("index_node");
|
|
125
|
+
if (py::isinstance<py::list>(idx_n)) {
|
|
126
|
+
py::list l = idx_n.cast<py::list>();
|
|
127
|
+
for (auto item : l) index_to_node_vec.push_back(item.cast<py::object>());
|
|
128
|
+
} else if (py::isinstance<py::dict>(idx_n)) {
|
|
129
|
+
py::dict d = idx_n.cast<py::dict>();
|
|
130
|
+
index_to_node_vec.resize(py::len(d));
|
|
131
|
+
for (auto item : d) {
|
|
132
|
+
index_to_node_vec[item.first.cast<int>()] = item.second.cast<py::object>();
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
} else {
|
|
136
|
+
index_to_node_vec.resize(py::len(node_index));
|
|
137
|
+
for (auto item : node_index) {
|
|
138
|
+
index_to_node_vec[item.second.cast<int>()] = item.first.cast<py::object>();
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
std::vector<int> target_ids;
|
|
143
|
+
bool is_single_node = false;
|
|
144
|
+
|
|
145
|
+
if (v.is_none()) {
|
|
146
|
+
target_ids.resize(N);
|
|
147
|
+
for (int i = 0; i < N; ++i) target_ids[i] = i + 1;
|
|
148
|
+
} else if (py::isinstance<py::list>(v) || py::isinstance<py::tuple>(v) || py::isinstance<py::set>(v)) {
|
|
149
|
+
py::iterable v_iterable = v.cast<py::iterable>();
|
|
150
|
+
for (py::handle node : v_iterable) {
|
|
151
|
+
if (node_index.contains(node)) {
|
|
152
|
+
target_ids.push_back(node_index[node].cast<int>() + 1);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
} else {
|
|
156
|
+
if (node_index.contains(v)) {
|
|
157
|
+
is_single_node = true;
|
|
158
|
+
target_ids.push_back(node_index[v].cast<int>() + 1);
|
|
159
|
+
} else {
|
|
160
|
+
throw py::value_error("Node not found in graph.");
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
int num_targets = target_ids.size();
|
|
165
|
+
if (num_targets == 0) return py::dict();
|
|
166
|
+
|
|
167
|
+
std::vector<double> ecc_values(num_targets, -1.0);
|
|
168
|
+
bool is_connected = true;
|
|
169
|
+
|
|
170
|
+
{
|
|
171
|
+
py::gil_scoped_release release;
|
|
172
|
+
|
|
173
|
+
#pragma omp parallel for schedule(dynamic)
|
|
174
|
+
for (int i = 0; i < num_targets; i++) {
|
|
175
|
+
if (!is_connected) continue;
|
|
176
|
+
int u = target_ids[i];
|
|
177
|
+
|
|
178
|
+
double ecc_val = _bfs_eccentricity(G_l, u);
|
|
179
|
+
|
|
180
|
+
if (ecc_val < 0) {
|
|
181
|
+
#pragma omp critical
|
|
182
|
+
is_connected = false;
|
|
183
|
+
} else {
|
|
184
|
+
ecc_values[i] = ecc_val;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
if (!is_connected) {
|
|
190
|
+
std::string msg = is_directed ?
|
|
191
|
+
"Found infinite path length because the digraph is not strongly connected" :
|
|
192
|
+
"Found infinite path length because the graph is not connected";
|
|
193
|
+
throw py::value_error(msg);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
if (is_single_node) {
|
|
197
|
+
return py::cast(ecc_values[0]);
|
|
198
|
+
} else {
|
|
199
|
+
py::dict result;
|
|
200
|
+
for (int i = 0; i < num_targets; i++) {
|
|
201
|
+
int internal_id = target_ids[i];
|
|
202
|
+
py::object original_node = index_to_node_vec[internal_id - 1];
|
|
203
|
+
result[original_node] = ecc_values[i];
|
|
204
|
+
}
|
|
205
|
+
return result;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
#include "mst.h"
|
|
2
|
-
|
|
2
|
+
#ifdef _OPENMP
|
|
3
|
+
#include <omp.h>
|
|
4
|
+
#endif
|
|
3
5
|
#include <cmath>
|
|
4
6
|
|
|
5
7
|
#include "../../classes/graph.h"
|
|
@@ -167,3 +169,146 @@ py::object prim_mst_edges(py::object G, py::object minimum, py::object weight, p
|
|
|
167
169
|
}
|
|
168
170
|
return res;
|
|
169
171
|
}
|
|
172
|
+
|
|
173
|
+
struct CompactEdge {
|
|
174
|
+
int u, v, id;
|
|
175
|
+
double wt;
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
struct AtomicBest {
|
|
179
|
+
std::atomic<int> edge_idx;
|
|
180
|
+
AtomicBest() : edge_idx(-1) {}
|
|
181
|
+
AtomicBest(const AtomicBest& other) : edge_idx(other.edge_idx.load()) {}
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
struct IntUnionFind {
|
|
185
|
+
std::vector<int> parent;
|
|
186
|
+
std::vector<int> rank;
|
|
187
|
+
int component_count;
|
|
188
|
+
|
|
189
|
+
IntUnionFind(int n) : parent(n), rank(n, 0), component_count(n) {
|
|
190
|
+
for (int i = 0; i < n; i++) parent[i] = i;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
int find(int i) {
|
|
194
|
+
if (parent[i] == i) return i;
|
|
195
|
+
return parent[i] = find(parent[i]);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
int find_readonly(int i) const {
|
|
199
|
+
while (i != parent[i]) {
|
|
200
|
+
i = parent[i];
|
|
201
|
+
}
|
|
202
|
+
return i;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
bool unite(int i, int j) {
|
|
206
|
+
int root_i = find(i);
|
|
207
|
+
int root_j = find(j);
|
|
208
|
+
if (root_i != root_j) {
|
|
209
|
+
if (rank[root_i] < rank[root_j]) parent[root_i] = root_j;
|
|
210
|
+
else if (rank[root_i] > rank[root_j]) parent[root_j] = root_i;
|
|
211
|
+
else { parent[root_i] = root_j; rank[root_j]++; }
|
|
212
|
+
component_count--;
|
|
213
|
+
return true;
|
|
214
|
+
}
|
|
215
|
+
return false;
|
|
216
|
+
}
|
|
217
|
+
};
|
|
218
|
+
|
|
219
|
+
py::object boruvka_mst_edges(py::object G, py::object minimum, py::object weight, py::object data, py::object ignore_nan) {
|
|
220
|
+
Graph& G_ = G.cast<Graph&>();
|
|
221
|
+
std::string weight_key = weight_to_string(weight);
|
|
222
|
+
int sign = minimum.cast<bool>() ? 1 : -1;
|
|
223
|
+
bool return_data = data.cast<bool>();
|
|
224
|
+
bool ignore_n = ignore_nan.cast<bool>();
|
|
225
|
+
|
|
226
|
+
std::shared_ptr<COOGraph> coo = G_.gen_COO(weight_key);
|
|
227
|
+
int num_nodes = coo->nodes.size();
|
|
228
|
+
int num_edges = coo->row.size();
|
|
229
|
+
|
|
230
|
+
if (num_nodes == 0) return py::list();
|
|
231
|
+
|
|
232
|
+
std::vector<CompactEdge> active_edges;
|
|
233
|
+
active_edges.reserve(num_edges);
|
|
234
|
+
|
|
235
|
+
const auto& W_vec = *(coo->W_map[weight_key]);
|
|
236
|
+
|
|
237
|
+
for (int i = 0; i < num_edges; ++i) {
|
|
238
|
+
double wt = W_vec[i] * sign;
|
|
239
|
+
if (std::isnan(wt)) {
|
|
240
|
+
if (!ignore_n) {
|
|
241
|
+
PyErr_Format(PyExc_ValueError, "NaN found as an edge weight.");
|
|
242
|
+
return py::none();
|
|
243
|
+
}
|
|
244
|
+
continue;
|
|
245
|
+
}
|
|
246
|
+
active_edges.push_back({coo->row[i], coo->col[i], i, wt});
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
IntUnionFind uf(num_nodes);
|
|
250
|
+
std::vector<bool> in_mst(num_edges, false);
|
|
251
|
+
{
|
|
252
|
+
py::gil_scoped_release release;
|
|
253
|
+
|
|
254
|
+
while (uf.component_count > 1) {
|
|
255
|
+
std::vector<AtomicBest> best_at(num_nodes);
|
|
256
|
+
bool changed = false;
|
|
257
|
+
|
|
258
|
+
#pragma omp parallel for
|
|
259
|
+
for (int i = 0; i < (int)active_edges.size(); ++i) {
|
|
260
|
+
int root_u = uf.find_readonly(active_edges[i].u);
|
|
261
|
+
int root_v = uf.find_readonly(active_edges[i].v);
|
|
262
|
+
|
|
263
|
+
if (root_u != root_v) {
|
|
264
|
+
auto update_best = [&](int root, int edge_idx) {
|
|
265
|
+
int current = best_at[root].edge_idx.load(std::memory_order_relaxed);
|
|
266
|
+
while (current == -1 || active_edges[edge_idx].wt < active_edges[current].wt) {
|
|
267
|
+
if (best_at[root].edge_idx.compare_exchange_weak(current, edge_idx)) break;
|
|
268
|
+
}
|
|
269
|
+
};
|
|
270
|
+
update_best(root_u, i);
|
|
271
|
+
update_best(root_v, i);
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
for (int i = 0; i < num_nodes; ++i) {
|
|
276
|
+
int e_idx = best_at[i].edge_idx.load();
|
|
277
|
+
if (e_idx != -1) {
|
|
278
|
+
const auto& e = active_edges[e_idx];
|
|
279
|
+
if (uf.unite(e.u, e.v)) {
|
|
280
|
+
in_mst[e.id] = true;
|
|
281
|
+
changed = true;
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
if (!changed) break;
|
|
287
|
+
|
|
288
|
+
auto new_end = std::remove_if(active_edges.begin(), active_edges.end(), [&](const CompactEdge& e) {
|
|
289
|
+
return uf.find(e.u) == uf.find(e.v);
|
|
290
|
+
});
|
|
291
|
+
active_edges.erase(new_end, active_edges.end());
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
py::list ret;
|
|
296
|
+
for (int i = 0; i < num_edges; ++i) {
|
|
297
|
+
if (in_mst[i]) {
|
|
298
|
+
node_t u = coo->nodes[coo->row[i]];
|
|
299
|
+
node_t v = coo->nodes[coo->col[i]];
|
|
300
|
+
|
|
301
|
+
py::object u_obj = G_.id_to_node[py::cast(u)];
|
|
302
|
+
py::object v_obj = G_.id_to_node[py::cast(v)];
|
|
303
|
+
|
|
304
|
+
if (return_data) {
|
|
305
|
+
const auto& edge_attr = G_.adj.at(u).at(v);
|
|
306
|
+
ret.append(py::make_tuple(u_obj, v_obj, attr_to_dict(edge_attr)));
|
|
307
|
+
} else {
|
|
308
|
+
ret.append(py::make_tuple(u_obj, v_obj));
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
return ret;
|
|
314
|
+
}
|
|
@@ -16,3 +16,4 @@ class UnionFind {
|
|
|
16
16
|
|
|
17
17
|
py::object kruskal_mst_edges(py::object G, py::object minimum, py::object weight, py::object data, py::object ignore_nan);
|
|
18
18
|
py::object prim_mst_edges(py::object G, py::object minimum, py::object weight, py::object data, py::object ignore_nan);
|
|
19
|
+
py::object boruvka_mst_edges(py::object G, py::object minimum, py::object weight, py::object data, py::object ignore_nan);
|