Generate sparse6 format string from an 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. References ———- Sparse6 specification: http://cs.anu.edu.au/~bdm/data/formats.txt for details.
Examples
>>> G = nx.MultiGraph([(0, 1), (0, 1), (0, 1)])
>>> nx.generate_sparse6(G)
'>>sparse6<<:A_'