/***************************  Graph_Test.java *********************************/
import AlgoTools.*;

/** Programm zum Testen der Graph-Algorithmen
 */

public class Graph_Test  {

  public static void main (String [] argv) {

    int i;
    int[]e;
    Graph g = Graph_IO.einlesen();
    Graph_IO.ausgeben(g);

    e = Graph_Tiefensuche.tiefensuche(g);
    IO.println("Reihenfolge fuer Tiefensuche: ");
    for (i=0; i<e.length; i++) IO.print(e[i],3);
    IO.println();
    
    e = Graph_TopoSort.sort(g);
    if (e==null) 
      IO.println("Graph ist zyklisch");
    else {
      IO.print("Graph ist azyklisch. Reihenfolge: ");
      for (i=0; i<e.length; i++) IO.print(e[i],3);
    }

  }
    
}

