Class GraphIO

Class Documentation

class GraphIO

Public Functions

void writeEdgeList(const Graph &G, std::string_view path)

Writes graph to text file in edge list format. Keep in mind that isolated nodes are ignored.

Edge list format: for each edge {u, v}: write line “u v”

Parameters:
  • G[in] graph

  • path[in] file path

void writeAdjacencyList(const Graph &G, std::string_view path)

Writes graph to text file in adjacency list format.

Adjacency list format: for each node v: write “v” write “x” for each edge {v, x} end line

Parameters:
  • G[in] graph

  • path[in] file path