The following:
vectorstandard::UnDirectedVertex parent(num_vertices(graph_));
prim_minimum_spanning_tree(graph_,&parent[0]);
gives me the minimum spanning tree using the boost::edge_weight property
however I would like to use another property as I use the
boost::edge_weight property for other things. I tried as described here
but have some problems see error messages. I believe it is because of
the parameter boost::default_dijkstra_visitor() however I do not know
how to fix it:
vectorstandard::UnDirectedVertex parent(num_vertices(graph_));
vectorstd::size_t distance(num_vertices(graph_));
boost::property_map::type weightmap =
boost::get(mst_cost, graph_);
boost::property_map::type
indexmap = get(boost::vertex_index, graph_);
prim_minimum_spanning_tree(graph_,0, &parent[0],
&distance[0],weightmap,indexmap,boost::default_dijkstra_visitor());
The error message is:
1>c:\program files\microsoft visual studio 8\vc\include\limits(109) :
error C2440: '<function-style-cast>' : cannot convert from 'int' to 'W'
1> No constructor could take the source type, or constructor
overload resolution was ambiguous
1> c:\program files\microsoft visual studio
8\vc\include\limits(107) : while compiling class template member
function 'W std::numeric_limits<_Ty>::max(void) throw()'
1> with
1> [
1> _Ty=W
1> ]
1>
c:\boost\include\boost-1_33_1\boost\graph\prim_minimum_spanning_tree.hpp
(61) : see reference to class template instantiation
'std::numeric_limits<_Ty>' being compiled
1> with
1> [
1> _Ty=W
1> ]
It would be nice if someone could help.
Thanks.
Line