Read simple undirected graphs in graph6 format from path.
Parameters: | path : file or string
|
---|---|
Returns: | G : Graph or list of Graphs
|
Raises: | NetworkXError :
|
See also
References
Graph6 specification: http://cs.anu.edu.au/~bdm/data/formats.txt for details.
Examples
>>> nx.write_graph6(nx.Graph([(0,1)]), 'test.g6')
>>> G = nx.read_graph6('test.g6')
>>> sorted(G.edges())
[(0, 1)]