Hi
I have some problems with using prim_minimum_spanning_tree function
My major problem is I want to use a different weight than standard.
My code:
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> ]
Can any one help getting the call right???
Thanks
Line