You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have looked into the code and this is what I have understood/suggest.
This happens because the loop that prints the vertices is:
first_layer_map = self.layers[1].node_to_name_map()
.
.
for i in self.layers[1].nodes:
first = first_layer_map[i]
second = self.layers[1].nodes[i]
file.write('{0} "{1}"\n'.format(first, second))
I suggest to use:
first_layer_map = self.layers[1].node_to_name_map()
.
.
for name, index, in first_layer_map.items():
file.write('{0} "{1}"\n'.format(index+1, name))
edit: We need the index+1 in the write as Infomap do not like indexes starting from 0.
It creates a file where after the #Vertices , it writes each node with all its properties, e.g.
Instead, we usually need only its name (at least when using this .net files for infomap), e.g.
The text was updated successfully, but these errors were encountered: