本文簡要介紹
networkx.algorithms.chordal.chordal_graph_cliques
的用法。用法:
chordal_graph_cliques(G)
返回弦圖的最大團集。
該算法將圖分解為連通分量,並在每個分量中執行最大基數搜索以獲得團。
- G:圖形
NetworkX 圖
- cliques:包含 G 中最大團的集合。
- NetworkXError
該算法不支持 DiGraph、MultiGraph 和 MultiDiGraph。該算法隻能應用於弦圖。如果發現輸入圖是非弦圖,則會引發
NetworkXError
。
參數:
返回:
拋出:
例子:
>>> e = [ ... (1, 2), ... (1, 3), ... (2, 3), ... (2, 4), ... (3, 4), ... (3, 5), ... (3, 6), ... (4, 5), ... (4, 6), ... (5, 6), ... (7, 8), ... ] >>> G = nx.Graph(e) >>> G.add_node(9) >>> setlist = nx.chordal_graph_cliques(G)
相關用法
- Python NetworkX chordal_graph_treewidth用法及代碼示例
- Python NetworkX connected_double_edge_swap用法及代碼示例
- Python NetworkX categorical_edge_match用法及代碼示例
- Python NetworkX cn_soundarajan_hopcroft用法及代碼示例
- Python NetworkX complete_multipartite_graph用法及代碼示例
- Python NetworkX clustering用法及代碼示例
- Python NetworkX contracted_edge用法及代碼示例
- Python NetworkX circulant_graph用法及代碼示例
- Python NetworkX contracted_nodes用法及代碼示例
- Python NetworkX communicability_exp用法及代碼示例
- Python NetworkX categorical_node_match用法及代碼示例
- Python NetworkX collaboration_weighted_projected_graph用法及代碼示例
- Python NetworkX communicability用法及代碼示例
- Python NetworkX capacity_scaling用法及代碼示例
- Python NetworkX circular_layout用法及代碼示例
- Python NetworkX connected_caveman_graph用法及代碼示例
- Python NetworkX connected_components用法及代碼示例
- Python NetworkX cut_size用法及代碼示例
- Python NetworkX configuration_model用法及代碼示例
- Python NetworkX caveman_graph用法及代碼示例
- Python NetworkX complete_to_chordal_graph用法及代碼示例
- Python NetworkX communicability_betweenness_centrality用法及代碼示例
- Python NetworkX closeness_vitality用法及代碼示例
- Python NetworkX cuthill_mckee_ordering用法及代碼示例
- Python NetworkX cytoscape_data用法及代碼示例
注:本文由純淨天空篩選整理自networkx.org大神的英文原創作品 networkx.algorithms.chordal.chordal_graph_cliques。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。