支持的算法#
nx-cugraph 是 NetworkX 的后端,它将 pylibcugraph(cuGraph 的低级 Python 接口,用于其基于 CUDA 的图分析库)和 CuPy(一个 GPU 加速的数组库)连接到 NetworkX 熟悉且易于使用的 API。
以下是 nx-cugraph 当前支持的算法列表。
算法#
二分图 |
---|
betweenness_centrality |
complete_bipartite_graph |
中心性 |
---|
betweenness_centrality |
degree_centrality |
edge_betweenness_centrality |
eigenvector_centrality |
in_degree_centrality |
katz_centrality |
out_degree_centrality |
聚类 |
---|
average_clustering |
clustering |
transitivity |
triangles |
社区 |
---|
leiden_communities |
louvain_communities |
连通分量 |
---|
connected_components |
is_connected |
is_weakly_connected |
node_connected_component |
number_connected_components |
number_weakly_connected_components |
weakly_connected_components |
核心 |
---|
core_number |
k_truss |
DAG |
---|
ancestors |
descendants |
孤立节点 |
---|
is_isolate |
isolates |
number_of_isolates |
链接分析 |
---|
hits |
pagerank |
链接预测 |
---|
jaccard_coefficient |
最近公共祖先 |
---|
lowest_common_ancestor |
运算符 |
---|
complement |
reverse |
互反性 |
---|
overall_reciprocity |
reciprocity |
最短路径 |
---|
has_path |
shortest_path |
shortest_path_length |
all_pairs_shortest_path |
all_pairs_shortest_path_length |
bidirectional_shortest_path |
single_source_shortest_path |
single_source_shortest_path_length |
single_target_shortest_path |
single_target_shortest_path_length |
all_pairs_bellman_ford_path |
all_pairs_bellman_ford_path_length |
all_pairs_dijkstra |
all_pairs_dijkstra_path |
all_pairs_dijkstra_path_length |
bellman_ford_path |
bellman_ford_path_length |
dijkstra_path |
dijkstra_path_length |
single_source_bellman_ford |
single_source_bellman_ford_path |
single_source_bellman_ford_path_length |
single_source_dijkstra |
single_source_dijkstra_path |
single_source_dijkstra_path_length |
遍历 |
---|
bfs_edges |
bfs_layers |
bfs_predecessors |
bfs_successors |
bfs_tree |
descendants_at_distance |
generic_bfs_edges |
树 |
---|
is_arborescence |
is_branching |
is_forest |
is_tree |
工具类#
类 |
---|
is_negatively_weighted |
转换 |
---|
from_dict_of_lists |
to_dict_of_lists |
矩阵转换 |
---|
from_pandas_edgelist |
from_scipy_sparse_array |
重新标记 |
---|
convert_node_labels_to_integers |
relabel_nodes |
生成器#
经典 |
---|
barbell_graph |
circular_ladder_graph |
complete_graph |
complete_multipartite_graph |
cycle_graph |
empty_graph |
ladder_graph |
lollipop_graph |
null_graph |
path_graph |
star_graph |
tadpole_graph |
trivial_graph |
turan_graph |
wheel_graph |
经典 |
---|
caveman_graph |
Ego |
---|
ego_graph |
小型 |
---|
bull_graph |
chvatal_graph |
cubical_graph |
desargues_graph |
diamond_graph |
dodecahedral_graph |
frucht_graph |
heawood_graph |
house_graph |
house_x_graph |
icosahedral_graph |
krackhardt_kite_graph |
moebius_kantor_graph |
octahedral_graph |
pappus_graph |
petersen_graph |
sedgewick_maze_graph |
tetrahedral_graph |
truncated_cube_graph |
truncated_tetrahedron_graph |
tutte_graph |
社交 |
---|
davis_southern_women_graph |
florentine_families_graph |
karate_club_graph |
les_miserables_graph |
要请求 nx-cugraph 后端支持上面未列出的 NetworkX API,请访问 nx-cugraph GitHub 仓库。