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.


simple_cycles(graph, /)#

Find all simple cycles of a PyDiGraph

A “simple cycle” (called an elementary circuit in [1]) is a cycle (or closed path) where no node appears more than once.

This function is a an implementation of Johnson’s algorithm [1] also based on the non-recursive implementation found in NetworkX. [2][3]

[1] [2] [3]