Class NetworkitBinaryReader

Inheritance Relationships

Base Type

Class Documentation

class NetworkitBinaryReader : public NetworKit::GraphReader

Reads a graph written in the custom Networkit binary format. Note that there are multiple versions of the Networkit binary format. This Reader can read files that are written with format version 2 and 3. Format version 3 was released with Networkit 9.1 (December 2021). Further information can be found here: https://github.com/networkit/networkit/blob/master/networkit/cpp/io/NetworkitBinaryGraph.md

Note
A new version 4 is slated for an upcoming release (time of statement: February 2026). This version supports writing/reading graphs with deleted nodes. As with version 3, all networks written with the new code are automatically upgraded to the newest version 4. If you want to use v4 right away, you can use nightly builds (see Readme on github).

Public Functions

inline NetworkitBinaryReader()
virtual Graph read(std::string_view path) override

Given the path of an input file, read the graph contained.

Parameters:

path[in] input file path

Graph readFromBuffer(const std::vector<uint8_t> &data)