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
The NetworkitBinaryReader tries to read edges multiple times for undirected graphs. The resulting graph is correct, since the multi-edge is suppressed. Happens both for C++ and Python.
Example (in Python):
import networkit as nk
G = nk.generators.ErdosRenyiGenerator(100, 0.5, False, False).generate();
nk.overview(G)
nk.setLogLevel("DEBUG")
nkWriter = nk.graphio.NetworkitBinaryWriter()
nkWriter.write(G, "./G_gen.nkbg")
nkReader = nk.graphio.NetworkitBinaryReader()
G = nkReader.read("./G_gen.nkbg")
nk.overview(G)
Output of nk.overview:
Network Properties:
nodes, edges 100, 2477
directed? False
weighted? False
isolated nodes 0
self-loops 0
density 0.500404
clustering coefficient 0.501031
min/max/avg degree 38, 67, 49.540000
degree assortativity -0.029328
number of connected components 1
size of largest component 100 (100.00 %)
Network Properties:
nodes, edges 100, 2477
directed? False
weighted? False
isolated nodes 0
self-loops 0
density 0.500404
clustering coefficient 0.501031
min/max/avg degree 38, 67, 49.540000
degree assortativity -0.029328
number of connected components 1
size of largest component 100 (100.00 %)
Warnings:
[INFO ][/project/networkit/cpp/io/NetworkitBinaryWriter.cpp, 29: virtual void NetworKit::NetworkitBinaryWriter::write(const NetworKit::Graph&, const string&)]: Written graph to ./G_gen.nkbg
[WARN ][/project/networkit/cpp/io/NetworkitBinaryReader.cpp, 274: NetworKit::NetworkitBinaryReader::readData<NetworKit::MemoryMappedFile>::<lambda(uint64_t)>]: Not adding edge 0-1 since it is already present.
[WARN ][/project/networkit/cpp/io/NetworkitBinaryReader.cpp, 274: NetworKit::NetworkitBinaryReader::readData<NetworKit::MemoryMappedFile>::<lambda(uint64_t)>]: Not adding edge 0-4 since it is already present.
[WARN ][/project/networkit/cpp/io/NetworkitBinaryReader.cpp, 274: NetworKit::NetworkitBinaryReader::readData<NetworKit::MemoryMappedFile>::<lambda(uint64_t)>]: Not adding edge 0-5 since it is already present.
...
The text was updated successfully, but these errors were encountered:
The
NetworkitBinaryReader
tries to read edges multiple times for undirected graphs. The resulting graph is correct, since the multi-edge is suppressed. Happens both for C++ and Python.Example (in Python):
Output of
nk.overview
:Warnings:
The text was updated successfully, but these errors were encountered: