@nodes_or_number(0)
def cycle_graph(n, create_using=None):
 (n_orig, nodes) = n
 G = empty_graph(nodes, create_using)
 G.name = ('cycle_graph(%s)' % (n_orig,))
 G.add_edges_from(nx.utils.pairwise(nodes))
 G.add_edge(nodes[(-1)], nodes[0])
 return G

@ nodes_or_number ( 0 ) def cycle_graph ( n , create_using = None ) : ( n_orig , nodes ) = n G = empty_graph ( nodes , create_using ) G . name = ( 'cycle_graph(%s)' % ( n_orig , ) ) G . add_edges_from ( nx . utils . pairwise ( nodes ) ) G . add_edge ( nodes [ ( - 1 ) ] , nodes [ 0 ] ) return G
return the cycle graph c_n of cyclicly connected nodes .