• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 
2 #include <boost/parameter.hpp>
3 #include <iostream>
4 
5 BOOST_PARAMETER_NAME(graph)
BOOST_PARAMETER_NAME(visitor)6 BOOST_PARAMETER_NAME(visitor)
7 BOOST_PARAMETER_NAME(root_vertex)
8 BOOST_PARAMETER_NAME(index_map)
9 BOOST_PARAMETER_NAME(color_map)
10 
11 #include <boost/graph/depth_first_search.hpp> // for dfs_visitor
12 
13 BOOST_PARAMETER_FUNCTION((bool), depth_first_search, tag,
14     (required
15         (graph, *)
16         (visitor, *)
17         (root_vertex, *)
18         (index_map, *)
19         (color_map, *)
20     )
21 )
22 {
23     std::cout << "graph=" << graph;
24     std::cout << std::endl;
25     std::cout << "visitor=" << visitor;
26     std::cout << std::endl;
27     std::cout << "root_vertex=" << root_vertex;
28     std::cout << std::endl;
29     std::cout << "index_map=" << index_map;
30     std::cout << std::endl;
31     std::cout << "color_map=" << color_map;
32     std::cout << std::endl;
33     return true;
34 }
35 
36 #include <boost/core/lightweight_test.hpp>
37 
main()38 int main()
39 {
40     char const* g = "1";
41     depth_first_search(1, 2, 3, 4, 5);
42     depth_first_search(
43         g, '2', _color_map = '5'
44       , _index_map = "4", _root_vertex = "3"
45     );
46     return boost::report_errors();
47 }
48 
49