strongcomp.c
资源名称:leda.tar.gz [点击查看]
上传用户:gzelex
上传日期:2007-01-07
资源大小:707k
文件大小:0k
源码类别:
数值算法/人工智能
开发平台:
MultiPlatform
- #include <LEDA/graph.h>
- #include <LEDA/graph_alg.h>
- main()
- {
- GRAPH<int,int> G;
- test_graph(G);
- node_array<int> compnum(G);
- float T;
- cout << "STRONG_COMPONENTS ";
- cout.flush();
- T = used_time();
- STRONG_COMPONENTS(G,compnum);
- cout << string(" %6.2f secn",used_time(T));
- newline;
- if (Yes("Ausgabe?"))
- { node v;
- forall_nodes(v,G)
- { G.print_node(v);
- cout << string(" comp = %3d n", compnum[v]);
- }
- }
- newline;
- return 0;
- }