Ticket #8791: x.cpp
File x.cpp, 478 bytes (added by , 9 years ago) |
---|
Line | |
---|---|
1 | |
2 | // compiled on Linux 64: |
3 | // g++ -std=c++0x -I/home/user/local/boost/include -frounding-math -O2 x.cpp -o x.exe |
4 | |
5 | #include <boost/graph/adjacency_list.hpp> |
6 | #include <boost/graph/graph_utility.hpp> |
7 | #include <boost/graph/transitive_closure.hpp> // must on top |
8 | |
9 | int main(int, char *[]) { |
10 | using namespace boost; |
11 | typedef adjacency_list < listS, vecS, directedS > G; |
12 | G g; |
13 | add_edge(0,1, g); |
14 | |
15 | adjacency_list <> tc; |
16 | transitive_closure(g, tc); |
17 | print_graph(tc); |
18 | return 0; |
19 | } |