[Networkit] EdgeListWriter

Matteo Riondato matteo at cs.brown.edu
Wed Dec 14 15:09:19 CET 2016

Hi all,

The EdgeListWriter class is not documented in the io module (https://networkit.iti.kit.edu/api/doxyhtml/group__io.html). 
I committed a one-line fix to the Dev branch. 

While here, I noticed that the comment at the beginning of EdgeListWriter says:

 * A writer for the edge list format used by the LFR benchmark generators, defined as:
 * 		list of edges (nodes are labelled from 1 to the number of nodes;
 * 		the edges are ordered and repeated twice, i.e. source-target and target-source).

The edges are definitively not repeated twice when the graph is undirected (I tested it and this can also be concluded by looking at the code), and I believe also when the graph is directed (the code is using Graph.forEdges( )).

Also, the nodes are not necessarily labeled from 1 (the constructor allows the user to choose the starting node index).

I’m not sure whether the current implementation is what is desired (in my opinion, yes, this is what I expect from a class called EdgeListWriter) and the comment should be fixed, or whether the implementation should be fixed (my opinion: no, rather one should create a LFRWriter class that achieves what the comment says.)

Before doing any of these, I’d love to know what the consensus is.

Thank you,


More information about the NetworKit mailing list