连通性与环#

rustworkx.number_connected_components(graph, /)

在无向图中查找连通分量的数量

rustworkx.connected_components(graph, /)

在无向图中查找连通组件

rustworkx.node_connected_component(graph, ...)

返回包含节点 node 的图组件中的节点集合。

rustworkx.is_connected(graph, /)

检查无向图是否完全连接

rustworkx.number_strongly_connected_components(...)

在有向图中查找强连通分量的数量

rustworkx.strongly_connected_components(graph, /)

在有向图中查找强连通分量

rustworkx.is_strongly_connected(graph, /)

检查有向图是否为强连通图

rustworkx.number_weakly_connected_components(...)

查找有向图中的弱连通分量数量

rustworkx.weakly_connected_components(graph, /)

找到有向图中的弱连通分量

rustworkx.is_weakly_connected(图结构, /)

检查有向图是否为弱连通

rustworkx.cycle_basis(graph, /[, root])

返回构成给定PyGraph循环基的循环列表。

rustworkx.simple_cycles(graph, /)

查找 PyDiGraph 的所有简单周期

rustworkx.digraph_find_cycle(graph, /[, source])

返回给定PyDiGraph在DFS过程中遇到的第一个循环,如果未找到循环则返回空列表

rustworkx.articulation_points(graph, /)

返回无向图的关节点。

rustworkx.bridges(graph, /)

返回无向图的桥。

rustworkx.biconnected_components(graph, /)

返回无向图的双连通分量。

rustworkx.chain_decomposition(图, /[, 源])

返回图的链分解。

rustworkx.all_simple_paths(graph, from_, to)

返回PyGraph对象中两个节点之间的所有简单路径

rustworkx.all_pairs_all_simple_paths(graph)

返回图中所有节点对之间的所有简单路径

rustworkx.stoer_wagner_min_cut(graph, /[, ...])

使用Stoer-Wagner算法计算带权最小割。

rustworkx.longest_simple_path(graph)

返回图形中的最长简单路径

rustworkx.is_bipartite(graph)

检查给定图是否为二分图

rustworkx.isolates(graph)

返回图对象中的孤立节点列表

rustworkx.has_path(graph, source, target[, ...])

检查源节点和目标节点之间是否存在路径

rustworkx.connected_subgraphs(graph, k, /)

返回所有恰好包含k个节点的连通子图(作为节点索引列表)