public static void Main(string[] args) { var filename = args[0]; var separator = args[1].ToCharArray()[0]; var sg = new SymbolGraph(filename, separator); var top = new Topological(sg.GetDirG()); foreach (var v in top.Order) { Console.WriteLine(sg.GetName(v)); } }
public AcyclicLP(EdgeWeightedDigraph G, int s) { EdgeTo = new DirectedEdge[G.V]; DistTo = new double[G.V]; for (int v = 0; v < G.V; v++) { DistTo[v] = double.NegativeInfinity; } DistTo[s] = 0.0; var top = new Topological(G); foreach (var v in top.Order) { Relax(G, v); } }