home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / dos / diverses / leda / prog / graph / strongco.c < prev    next >
Encoding:
C/C++ Source or Header  |  1991-11-15  |  462 b   |  35 lines

  1. #include <LEDA/graph.h>
  2. #include <LEDA/graph_alg.h>
  3.  
  4. declare2(GRAPH,int,int);
  5.  
  6.  
  7. main()
  8. {
  9.  
  10. GRAPH(int,int) G;
  11.  
  12. test_graph(G);
  13.  
  14. node_array(int) compnum(G);
  15.  
  16. real T;
  17.  
  18. cout << "STRONG_COMPONENTS    ";
  19. cout.flush();
  20. T = used_time();
  21. STRONG_COMPONENTS(G,compnum);
  22. cout << form("    %6.2f sec\n",used_time(T));
  23. newline;
  24.  
  25. if (Yes("Ausgabe?")) 
  26.  { node v;
  27.    forall_nodes(v,G) 
  28.    { G.print_node(v);
  29.      cout << form("  comp = %3d \n", compnum[v]);
  30.     }
  31.   }
  32. newline;
  33.  
  34. }
  35.