I have a csv file that represent a direct graph, it's an edgelist with non continuous id nodes and i read it in a neworkit graph with the method
reader = nk.graphio.EdgeListReader(',',1,'#',directed=True,continuous=False)
The problem is that networkit change the nodes id, it should be caused by the fact that the nodes of my graph start from an arbitrary number (not 0 or 1) and are not continuous. I wonder if there is a way to prevent this from happening without having to change the numbering of my nodes.
Here a view of my edgelist
#from_address,to_address
39243,1040
39244,39245
39246,30
39247,39248
39249,1040
39250,2611
And here the code to see nodes id are changed
reader = nk.graphio.EdgeListReader(',',1,'#',directed=True,continuous=False)
try:
g = reader.read(fname)
except:
print("File not exist")
exit()
i = 0
for u, v in g.iterEdges():
if i > 5:
print('...')
break
print(u, v)
i += 1
>
0 1
2 3
4 5
6 7
8 1
9 10
...