Line | |
---|
1 | // (C) Copyright Jeremy Siek 2004 |
---|
2 | // Distributed under the Boost Software License, Version 1.0. (See |
---|
3 | // accompanying file LICENSE_1_0.txt or copy at |
---|
4 | // http://www.boost.org/LICENSE_1_0.txt) |
---|
5 | |
---|
6 | #include <string> |
---|
7 | #include <iostream> |
---|
8 | #include <boost/cstdlib.hpp> |
---|
9 | #include <boost/graph/adjacency_list.hpp> |
---|
10 | #include <boost/graph/subgraph.hpp> |
---|
11 | |
---|
12 | int |
---|
13 | main() |
---|
14 | { |
---|
15 | using namespace boost; |
---|
16 | using std::string; |
---|
17 | |
---|
18 | typedef adjacency_list<vecS, vecS, directedS,no_property, |
---|
19 | property<edge_index_t, int>, |
---|
20 | property<graph_name_t, string> > graph_t; |
---|
21 | |
---|
22 | graph_t g; |
---|
23 | get_property(g, graph_name) = "graph"; |
---|
24 | |
---|
25 | std::cout << "name: " << get_property(g, graph_name) << std::endl; |
---|
26 | |
---|
27 | typedef subgraph<graph_t> subgraph_t; |
---|
28 | |
---|
29 | subgraph_t sg; |
---|
30 | get_property(sg, graph_name) = "subgraph"; |
---|
31 | |
---|
32 | std::cout << "name: " << get_property(sg, graph_name) << std::endl; |
---|
33 | |
---|
34 | return exit_success; |
---|
35 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.