Boost logo

Boost Users :

From: Line Blander Reinhardt (lbr_at_[hidden])
Date: 2008-06-03 05:59:02


 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:


      vector<standard::UnDirectedVertex> parent(num_vertices(graph_));

      vector<std::size_t> distance(num_vertices(graph_));

      boost::property_map<standard::Graph, mst_cost_t>::type weightmap =
boost::get(mst_cost, graph_);

      boost::property_map<standard::Graph, boost::vertex_index_t>::type
indexmap = get(boost::vertex_index, graph_);


      prim_minimum_spanning_tree(graph_,0, &parent[0],


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> ]

(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???




Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at