用法:
Graph.to_undirected()
返回图的无向副本。
- G:图形
具有相同节点的无向图,并且每个有向边 (u,v,weights) 被无向边 (u,v,weights) 替换。
返回:
例子:
>>> M = cudf.read_csv(datasets_path / 'karate.csv', delimiter=' ', ... dtype=['int32', 'int32', 'float32'], header=None) >>> DiG = cugraph.Graph(directed=True) >>> DiG.from_cudf_edgelist(M, '0', '1') >>> G = DiG.to_undirected()
相关用法
- Python cugraph.Graph.to_directed用法及代码示例
- Python cugraph.Graph.from_cudf_adjlist用法及代码示例
- Python cugraph.Graph.from_cudf_edgelist用法及代码示例
- Python cugraph.Graph.from_pandas_edgelist用法及代码示例
- Python cugraph.Graph用法及代码示例
- Python cugraph.community.spectral_clustering.spectralBalancedCutClustering用法及代码示例
- Python cugraph.link_prediction.jaccard.jaccard用法及代码示例
- Python cugraph.link_prediction.wjaccard.jaccard_w用法及代码示例
- Python cugraph.community.ecg.ecg用法及代码示例
- Python cugraph.community.louvain.louvain用法及代码示例
- Python cugraph.tree.minimum_spanning_tree.maximum_spanning_tree用法及代码示例
- Python cugraph.centrality.betweenness_centrality.betweenness_centrality用法及代码示例
- Python cugraph.link_analysis.pagerank.pagerank用法及代码示例
- Python cugraph.dask.community.louvain.louvain用法及代码示例
- Python cugraph.traversal.bfs.bfs用法及代码示例
- Python cugraph.community.egonet.batched_ego_graphs用法及代码示例
- Python cugraph.tree.minimum_spanning_tree.minimum_spanning_tree用法及代码示例
- Python cugraph.centrality.betweenness_centrality.edge_betweenness_centrality用法及代码示例
- Python cugraph.link_prediction.woverlap.overlap_w用法及代码示例
- Python cugraph.link_prediction.overlap.overlap用法及代码示例
注:本文由纯净天空筛选整理自rapids.ai大神的英文原创作品 cugraph.Graph.to_undirected。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。