| 735 | } |
| 736 | |
| 737 | RouterResultCode IndexRouter::CalculateSubrouteNoLeapsMode(IndexGraphStarter & starter, RouterDelegate const & delegate, |
| 738 | shared_ptr<AStarProgress> const & progress, |
| 739 | vector<Segment> & subroute) |
| 740 | { |
| 741 | using Vertex = IndexGraphStarter::Vertex; |
| 742 | using Edge = IndexGraphStarter::Edge; |
| 743 | using Weight = IndexGraphStarter::Weight; |
| 744 | |
| 745 | using Visitor = JunctionVisitor<IndexGraphStarter>; |
| 746 | Visitor visitor(starter, delegate, kVisitPeriod, progress); |
| 747 | |
| 748 | AStarAlgorithm<Vertex, Edge, Weight>::Params<Visitor, AStarLengthChecker> params( |
| 749 | starter, starter.GetStartSegment(), starter.GetFinishSegment(), delegate.GetCancellable(), std::move(visitor), |
| 750 | AStarLengthChecker(starter)); |
| 751 | |
| 752 | RoutingResult<Vertex, Weight> routingResult; |
| 753 | set<NumMwmId> const mwmIds = starter.GetMwms(); |
| 754 | RouterResultCode const result = FindPath<Vertex, Edge, Weight>(params, mwmIds, routingResult); |
| 755 | |
| 756 | if (result != RouterResultCode::NoError) |
| 757 | return result; |
| 758 | |
| 759 | LOG(LDEBUG, ("Result route weight:", routingResult.m_distance)); |
| 760 | subroute = std::move(routingResult.m_path); |
| 761 | return result; |
| 762 | } |
| 763 | |
| 764 | namespace |
| 765 | { |
nothing calls this directly
no test coverage detected