Generate graph6 format string from a simple undirected graph.
Parameters: | G : Graph (undirected) nodes: list or iterable :
header: bool :
|
---|---|
Returns: | s : string
|
Raises: | NetworkXError :
|
See also
Notes
The format does not support edge or node labels, parallel edges or self loops. If self loops are present they are silently ignored.
References
Graph6 specification: http://cs.anu.edu.au/~bdm/data/formats.txt for details.
Examples
>>> G = nx.Graph([(0, 1)])
>>> nx.generate_graph6(G)
'>>graph6<<A_'