Add a cycle.
Parameters : | nodes: iterable container :
attr : keyword arguments, optional (default= no attributes)
|
---|
Examples
>>> G=nx.Graph() # or DiGraph, MultiGraph, MultiDiGraph, etc
>>> G.add_cycle([0,1,2,3])
>>> G.add_cycle([10,11,12],weight=7)