brainpy.nn.graph_flow.detect_cycle#

brainpy.nn.graph_flow.detect_cycle(nodes, edges)[source]#

Detect whether a cycle exists in the defined graph.