[Python] simple_cycles produces output in non-deterministic order?

Discussão em 'Python' iniciado por Stack, Agosto 18, 2025.

  1. Stack

    Stack Membro Participativo

    I noticed that the output of NetworkX simple_cycles algorithm may not be deterministic, in the sense that same cycles in the same graph may be detected in a different order when an algorithm is run multiple times. Or the same cycle may be detected with nodes in the cycle not being in the same order all the time.

    Is this expected behavior of the algorithm? I glanced through the source code and I don't see any randomization elements in the order of execution/etc.

    If it's not to be expected, I'm wondering if there is something that messes up my graph in the background.

    Continue reading...

Compartilhe esta Página