This documents an unmaintained version of NetworkX. Please upgrade to a maintained version and see the current NetworkX documentation.


cycle_graph(n, create_using=None)[source]

Return the cycle graph C_n over n nodes.

C_n is the n-path with two end-nodes connected.

Node labels are the integers 0 to n-1 If create_using is a DiGraph, the direction is in increasing order.