Şöyle yaparız.
typedef adjacency_list
< vecS,
vecS,
undirectedS,
property<vertex_index_t, int>,
property<edge_index_t, int>
>
graph;
graph g(7);
add_edge(0,1,g);
add_edge(1,2,g);
add_edge(2,3,g);
add_edge(3,0,g);
add_edge(0,4,g);
add_edge(1,5,g);
add_edge(2,6,g);
add_edge(3,7,g);
add_edge(4,5,g);
add_edge(5,6,g);
add_edge(6,7,g);
add_edge(7,4,g);
make_connected(g); //Make connected (1/3)
Hiç yorum yok:
Yorum Gönder