Class EdgeListWriter

Inheritance Relationships

Base Type

Class Documentation

class EdgeListWriter : public NetworKit::GraphWriter

A writer for the edge list format. The output will contain one edge per line, in the format fromNodeSEPARATORtoNode, where separator can be specified by the user.

Public Functions

EdgeListWriter() = default
EdgeListWriter(char separator, node firstNode, bool bothDirections = false)
  • separator[in] character used to separate nodes in an edge line

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

  • bothDirections[in] for undirected graphs: if every edge shall be written in both directions (default: false)

virtual void write(const Graph &G, const std::string &path) override

Write the graph to a file.

  • G[in] the graph

  • path[in] the output file path