[Networkit] How to read in a large graph (and output a sparse matrix)

Raphael C drraph at gmail.com
Mon Aug 1 10:05:40 CEST 2016

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?


More information about the NetworKit mailing list