Home | Trees | Index | Help |
|
---|
Package NX :: Module io |
|
Read and write graphs and networks.
The example undirected graph below consists of the two edges (a,b),(a,c).
Function Summary | |
---|---|
Read graph in single line adjacency list format from path. | |
Read graph in edgelist format | |
Read graph object in python pickle format See cPickle. | |
Read graph in multiline adjacency list format. | |
Write graph in single line adjacency list format in file path. | |
Write graph G in edgelist format on file path. | |
Write graph object in python pickle format See cPickle. | |
Write graph in multiline adjacency list format. |
Variable Summary | |
---|---|
str |
__author__ = 'Aric Hagberg (hagberg@lanl.gov)\nDan Schul...
|
str |
__credits__ = ''
|
str |
__date__ = '$Date: 2005/03/30 23:56:28 $'
|
str |
__revision__ = '$Revision: 1.29 $'
|
Function Details |
---|
read_adjlist(path=False, create_using=False)Read graph in single line adjacency list format from path. The default is to create a simple graph from the adjacency list. The optional create_using argument allows other types of graphs. >>> G=DiGraph() >>> G=read_adjlist(file, create_using=G) Example adjacency list file format: # node degree a b c b a c a |
read_edgelist(path=False, create_using=False)Read graph in edgelist format Example adjacency list file format: # node degree a b a c |
read_gpickle(path=False)Read graph object in python pickle format See cPickle. |
read_multiline_adjlist(path=False, create_using=False)Read graph in multiline adjacency list format. Example multiline adjacency list file format: # node degree a 2 b c b 1 a c 1 a |
write_adjlist(G, path=False)Write graph in single line adjacency list format in file path. If no file is given, write to standard output. Example adjacency list file format: # node degree a b c b a c a |
write_edgelist(G, path=False)Write graph G in edgelist format on file path. If no file is given write to standard output. Example adjacency list file format: # node degree a b a c |
write_gpickle(G, path=False)Write graph object in python pickle format See cPickle. |
write_multiline_adjlist(G, path=False)Write graph in multiline adjacency list format. Example multiline adjacency list file format: # node degree a 2 b c b 1 a c 1 a |
Variable Details |
---|
__author__
|
__credits__
|
__date__
|
__revision__
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Mon Apr 11 10:59:19 2005 | http://epydoc.sf.net |