Dear networkx-discuss,
I searched for this problem within this group for a while but couldn't find a satisfying solution.
Given an undirected graph
G, how can I find all cycles in
G?
I believe that I should use
cycle_basis. The
documentation says
A basis for cycles of a network is a minimal collection of cycles such that any cycle in the network can be written as a sum of cycles in the basis. Here summation of cycles is defined as “exclusive or” of the edges.
How can I enumerate all sums of cycles in the basis and hence enumerate all cycles?
I would like to use as much from the networkx package as possible, and hopefully there is an easy way.
Thank you for your help!
-Fabian