| 779 | // static |
| 780 | template <typename Vertex, typename Edge, typename Weight> |
| 781 | void AStarAlgorithm<Vertex, Edge, Weight>::ReconstructPath(Vertex const & v, |
| 782 | typename BidirectionalStepContext::Parents const & parent, |
| 783 | std::vector<Vertex> & path) |
| 784 | { |
| 785 | path.clear(); |
| 786 | Vertex cur = v; |
| 787 | while (true) |
| 788 | { |
| 789 | path.push_back(cur); |
| 790 | auto const it = parent.find(cur); |
| 791 | if (it == parent.end()) |
| 792 | break; |
| 793 | cur = it->second; |
| 794 | } |
| 795 | |
| 796 | std::reverse(path.begin(), path.end()); |
| 797 | } |
| 798 | |
| 799 | // static |
| 800 | template <typename Vertex, typename Edge, typename Weight> |