]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/graph/random_spanning_tree.hpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / boost / graph / random_spanning_tree.hpp
index 76dc7f2b9aa406ff661f498412be8393fabe6ab9..ee23c5e1ee8218b56edfe89693e92c2ba1aa7ca7 100644 (file)
@@ -95,12 +95,26 @@ namespace boost {
     using namespace boost::graph::keywords;
     typedef bgl_named_params<P, T, R> params_type;
     BOOST_GRAPH_DECLARE_CONVERTED_PARAMETERS(params_type, params)
-    random_spanning_tree(g,
-                         gen,
-                         arg_pack[_root_vertex | *vertices(g).first],
-                         arg_pack[_predecessor_map],
-                         arg_pack[_weight_map | static_property_map<double>(1.)],
-                         boost::detail::make_color_map_from_arg_pack(g, arg_pack));
+    typedef typename graph_traits<Graph>::vertex_descriptor vertex_descriptor;
+    vertex_descriptor default_vertex = *vertices(g).first;
+    vertex_descriptor start_vertex = arg_pack[_root_vertex | default_vertex];
+    typename boost::parameter::binding<
+        arg_pack_type, 
+        boost::graph::keywords::tag::predecessor_map
+    >::type pred_map = arg_pack[_predecessor_map];
+    static_property_map<double> default_weight_map(1.);
+    typename boost::parameter::value_type<
+        arg_pack_type, 
+        boost::graph::keywords::tag::weight_map,
+        static_property_map<double>
+    >::type e_w_map = arg_pack[_weight_map | default_weight_map];
+    typename boost::detail::map_maker<
+        Graph,
+        arg_pack_type,
+        boost::graph::keywords::tag::color_map,
+        boost::default_color_type
+    >::map_type c_map = boost::detail::make_color_map_from_arg_pack(g, arg_pack);
+    random_spanning_tree(g, gen, start_vertex, pred_map, e_w_map, c_map);
   }
 }