Note

This is the documentation for the current state of the development branch of rustworkx. The documentation or APIs here can change prior to being released.

# Connectivity and Cycles#

 Find the number of connected components in an undirected graph. `rustworkx.connected_components`(graph, /) Find the connected components in an undirected graph `rustworkx.node_connected_component`(graph, ...) Returns the set of nodes in the component of graph containing node. `rustworkx.is_connected`(graph, /) Check if the graph is connected. Compute the strongly connected components for a directed graph Find the number of weakly connected components in a directed graph Find the weakly connected components in a directed graph `rustworkx.is_weakly_connected`(graph, /) Check if the graph is weakly connected `rustworkx.cycle_basis`(graph, /[, root]) Return a list of cycles which form a basis for cycles of a given PyGraph `rustworkx.simple_cycles`(graph, /) Find all simple cycles of a `PyDiGraph` `rustworkx.digraph_find_cycle`(graph, /[, source]) Return the first cycle encountered during DFS of a given PyDiGraph, empty list is returned if no cycle is found `rustworkx.articulation_points`(graph, /) Return the articulation points of an undirected graph. Return the biconnected components of an undirected graph. `rustworkx.chain_decomposition`(graph, /[, source]) Returns the chain decomposition of a graph. `rustworkx.all_simple_paths`(graph, from_, to) Return all simple paths between 2 nodes in a PyGraph object Return all the simple paths between all pairs of nodes in the graph `rustworkx.stoer_wagner_min_cut`(graph, /[, ...]) Compute a weighted minimum cut using the Stoer-Wagner algorithm. Return a longest simple path in the graph