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

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