I'm struggling with dijkstra_shortest_paths() usage. Here is a code snippet which gives tons of compilation error output :
Vertex_t s = *departIter; /* VertexIterator_t departIter */
std::vector<Vertex_t> p( boost::num_vertices( this->m_g ) ); /* Graph_t m_g; */
std::vector<EdgeProperties_t> d( boost::num_vertices( this->m_g ) );
dijkstra_shortest_paths(
this->m_g, s, predecessor_map(&p[0]).distance_map(&d[0])
);
And here are the typedefs used in my code :
struct EdgeProperties_t {
EdgeProperties_t( float fWeight ) : m_fWeight( fWeight ) { }
EdgeProperties_t( ) : m_fWeight( static_cast<float>(0.0) ) { }
float m_fWeight;
};
struct VertexProperties_t {
std::string m_sName;
};
typedef adjacency_list<
vecS, listS, undirectedS, VertexProperties_t, EdgeProperties_t
> Graph_t;
typedef boost::graph_traits<Graph_t>::vertex_descriptor Vertex_t;
typedef boost::graph_traits<Graph_t>::vertex_iterator VertexIterator_t;
Can anybody point me what could be wrong with it? My eyes seem to be soaped :(.