dijkstra_shortest_paths() 사용법에 어려움을 겪고 있습니다. 형식 정의 내 코드에 사용되는 여기BGL : dijkstra_shortest_paths 사용법
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])
);
그리고 :
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;
아무도 날 포인트 그것은 문제가 될 수있는 것을 여기에 컴파일 오류 출력의 톤을 제공하는 코드는? 내 눈
실제의 경우, – zoska
모든 것이 컴파일 시간 오류입니다. 템플릿 해상도에 문제가있는 것 같지만 식별 할 수는 없습니다 ... – Dmitry
아무런 답을 얻지 못할 것입니다. 오류 메시지가 표시되지 않았고 Minimal, Complete 및 Verifiable 예제를 만들지 않았습니다. – zoska