Defined in File TopologicalSort.hpp
public NetworKit::Algorithm
(Class Algorithm)
Given a directed graph G, the topology sort algorithm creates one valid topology order of nodes. Undirected graphs are not accepted as input, since a topology sort is a linear ordering of vertices such that for every edge u -> v, node u comes before v in the ordering.
Public Functions
Initialize the topological sort algorithm by passing an input graph. Note that topological sort is defined for directed graphs only. The node id mapping must be a continuous.
G – The input graph.
Execute the algorithm. The algorithm is not parallel.