Class EdgeListReader

Inheritance Relationships

Base Type

Class Documentation

class EdgeListReader : public NetworKit::GraphReader

A reader for various edge list formats, in which each line contains an edge as two node ids.

Public Functions

EdgeListReader() = default
EdgeListReader(char separator, node firstNode, std::string_view commentPrefix = "#", bool continuous = true, bool directed = false)
Parameters:
  • separator[in] character used to separate nodes in an edge line

  • firstNode[in] index of the first node in the file

  • commentPrefix[in] prefix of comment lines

  • continuous[in] boolean to specify if node ids are continuous

  • directed[in] read graph as directed

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

const std::map<std::string, node> &getNodeMap() const

Return the node map, in case node ids are not continuous