[Networkit] Help with reading edgelist format input files

Steve Koch stevekochscience at gmail.com
Fri May 29 19:53:07 CEST 2015


Hello,

I am getting some inconsistent results (exact betweenness) and am not sure
if there's something wrong with the installation I'm using, whether I have
a bug in python code, or whether I'm not creating input files with the
correct format.  Here is the behavior (all input files are '%d\t%d\n'
format):

* If I use edge list starting at 1, with no edges skipped the betweenness
calculates correctly, but the output nodes are renumbered to start at 0

* If I use an edge list starting at 2, it looks like nodes are shifted by
1, but also another node is created

* If I use an edge list starting at 0, I get different behavior, depending
on how many edges there are. The attached "0edge.txt" file produces a
segmentation fault.

We have been using edge lists that start at 1 and have been assuming
NetworKit just shifts them down by one to begin at zero, but otherwise
everything is fine. I am comfortable with this as long as it's what's
supposed to happen. But I am worried that I am just getting lucky.

Any thoughts on what I'm doing wrong?

I have attached the code, input files, and output files. Output files have
'_e0.txt' endings. I've also put the files at this public gist:
https://gist.github.com/stevekochscience/ffe37306f3c879c09c5b

Thank you!

--Steve

PS: I will also note that my code always crashes with a unicode error
during properties.overview(G) but it has always done that, maybe I
shouldn't have ignored that issue.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ira.uni-karlsruhe.de/mailman/private/networkit/attachments/20150529/8d55e9a8/attachment.html>
-------------- next part --------------
0	1
1	2
-------------- next part --------------
1	2
2	3
3	4
4	5
5	6
6	7
7	8
8	9
9	10
-------------- next part --------------
node	normalized betweenness
4	5.555556e-01
5	5.555556e-01
3	5.000000e-01
6	5.000000e-01
2	3.888889e-01
7	3.888889e-01
1	2.222222e-01
8	2.222222e-01
0	0.000000e+00
9	0.000000e+00
-------------- next part --------------
2	3
3	4
4	5
5	6
6	7
7	8
8	9
9	10
-------------- next part --------------
node	normalized betweenness
5	4.444444e-01
4	4.166667e-01
6	4.166667e-01
3	3.333333e-01
7	3.333333e-01
2	1.944444e-01
8	1.944444e-01
0	0.000000e+00
1	0.000000e+00
9	0.000000e+00
-------------- next part --------------
A non-text attachment was scrubbed...
Name: calcbetween_epsilon.py
Type: application/octet-stream
Size: 1379 bytes
Desc: not available
URL: <https://lists.ira.uni-karlsruhe.de/mailman/private/networkit/attachments/20150529/8d55e9a8/attachment.obj>


More information about the NetworKit mailing list