[Networkit] How to read in a large graph (and output a sparse matrix)
elisabetta.bergamini at kit.edu
Mon Aug 1 10:19:46 CEST 2016
Have you tried the following?
G = networkit.readGraph("dgraph.edgelist", networkit.Format.EdgeListSpaceOne)
Also, notice that EdgeListSpaceOne assumes the index of the first node in your edge list is 1 and that the node IDs are contiguous (and that your graph is undirected). Is that the case? If not, you should use a different format.
If you have more questions, feel free to ask.
Karlsruhe Institute of Technology (KIT)
Institute of Theoretical Informatics (ITI)
Theoret. Informatics / Parallel Computing
KIT - The Research University in the Helmholtz Association
On Aug 1, 2016, at 10:05, Raphael C <drraph at gmail.com> wrote:
> This is my first attempt to use networkit.
> I have a simple edge list text file of size
> 1.2GB. It was 62500000 edges and about half that many vertices. Each
> line looks like
> 287111206 357850135
> I would like to read in the graph and output a sparse adjacency
> I am using python and have networkit 4.1.1 which seems to be the
> latest version available through pip.
> I tried to find the right function in the docs. I have attempted.
> G = networkit.readGraph("dgraph.edgelist", fileformat = "EdgeListSpaceOne")
> G = networkit.readGraph("dgraph.edgelist", Format.EdgeList)
> But both return error messages. In fact the latter returns
> NameError: name 'Format' is not defined
> How do you read in a graph?
> NetworKit mailing list
> NetworKit at ira.uni-karlsruhe.de
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NetworKit