Class SNAPGraphReader

Inheritance Relationships

Base Type

Class Documentation

class SNAPGraphReader : public NetworKit::GraphReader

Public Functions

SNAPGraphReader(bool directed = false, const bool &remapNodes = true, const count &nodeCount = 0)

Default constructor for the SNAPGraphReader. NOTE: Keep in mind that many SNAP graphs do not have consecutive node ids. Passing a “false” in remapNodes forces the reader to add nodes for the highest occuring node id. This may result in a lot of isolated nodes, but further increases the speed of x2(in benchmarking)

Parameters:
  • directed[in] reads in the graph as directed, if set to true

  • remapNodes[in] indicates whether nodes should be remapped to other node ids in order to create consecutive node ids

  • nodeCount[in] nodeCount is used to preallocated memory for the number of nodes

virtual Graph read(const std::string &path) override

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

Parameters:

path[in] input file path