dijkstra's algorithm not computing the predecessors of the vertices in my boost graph
问题 I am trying to write a program which uses the boost graph library to construct a graph from a text file and then perform certain algorithms of the user's choice on it. My code runs fine, but once boost::dijkstra_shortest_paths() or boost::prim_minimum_spanning_tree() finishes executing, the predecessor property for each vertex is set to that self-same vertex! It's like the algorithm runs without doing its job. I am rather unsure why this is happening, and was wondering if someone could shine