Hello all,
I use boost graph library for some point cloud processing and have had great success. However, I’m struggling to compile Dijkstra shorted path on MSVC v140. I am using boost library 1.53 and compiling in 64 bit.
I used the example as a starting point but when I try to compile I get the error:
Error C2784 'E boost::detail::get(boost::detail::underlying_edge_desc_map_type<E>,const boost::detail::reverse_graph_edge_descriptor<EdgeDesc> &)': could not deduce template argument for 'boost::detail::underlying_edge_desc_map_type<E>'
from 'double *'
I understand the fundamental problem that the template can’t deduce type, however I’m struggling to source the problem.
My graph type is:
typedef
adjacency_list <
vecS,
vecS,
undirectedS,
no_property,
property <edge_weight_t,
double> >
WeightedGraph;
Because I’m using MSVC I use the suggested non parameter name version:
property_map<WeightedGraph,
vertex_index_t>::type
indexmap =
get(vertex_index,
GraphW);
property_map<WeightedGraph,
edge_weight_t>::type
weightmap;
std::vector<Vertex>
p(num_vertices(GraphW));
std::vector<double>
d(num_vertices(GraphW));
Vertex
s =
vertex(indices.first,
GraphW);
Vertex
s_end =
vertex(indices.second,
GraphW);
dijkstra_shortest_paths
(GraphW,
s, &p[0],
&d[0],
weightmap,
indexmap,
std::less<double>(),
closed_plus<double>(),
(double)(std::numeric_limits<double>::max)(),
(double)0,
Custom_visitor(s_end)
);
I’m using a custom visitor to stop processing early as in this stackoverflow post:
https://stackoverflow.com/questions/32047840/make-boost-dijkstra-algorithm-stop-when-it-reaches-a-destination-node
Any ideas? All help greatly appreciated.
Simon C