NetworkX

Previous topic

circular_ladder_graph

Next topic

dorogovtsev_goltsev_mendes_graph

cycle_graph

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.