| 706 | } |
| 707 | |
| 708 | RouterResultCode IndexRouter::CalculateSubrouteJointsMode(IndexGraphStarter & starter, RouterDelegate const & delegate, |
| 709 | shared_ptr<AStarProgress> const & progress, |
| 710 | vector<Segment> & subroute) |
| 711 | { |
| 712 | using JointsStarter = IndexGraphStarterJoints<IndexGraphStarter>; |
| 713 | JointsStarter jointStarter(starter, starter.GetStartSegment(), starter.GetFinishSegment()); |
| 714 | |
| 715 | using Visitor = JunctionVisitor<JointsStarter>; |
| 716 | Visitor visitor(jointStarter, delegate, kVisitPeriod, progress); |
| 717 | |
| 718 | using Vertex = JointsStarter::Vertex; |
| 719 | using Edge = JointsStarter::Edge; |
| 720 | using Weight = JointsStarter::Weight; |
| 721 | |
| 722 | AStarAlgorithm<Vertex, Edge, Weight>::Params<Visitor, AStarLengthChecker> params( |
| 723 | jointStarter, jointStarter.GetStartJoint(), jointStarter.GetFinishJoint(), delegate.GetCancellable(), |
| 724 | std::move(visitor), AStarLengthChecker(starter)); |
| 725 | |
| 726 | RoutingResult<Vertex, Weight> routingResult; |
| 727 | RouterResultCode const result = FindPath<Vertex, Edge, Weight>(params, {} /* mwmIds */, routingResult); |
| 728 | |
| 729 | if (result != RouterResultCode::NoError) |
| 730 | return result; |
| 731 | |
| 732 | LOG(LDEBUG, ("Result route weight:", routingResult.m_distance)); |
| 733 | subroute = ProcessJoints(routingResult.m_path, jointStarter); |
| 734 | return result; |
| 735 | } |
| 736 | |
| 737 | RouterResultCode IndexRouter::CalculateSubrouteNoLeapsMode(IndexGraphStarter & starter, RouterDelegate const & delegate, |
| 738 | shared_ptr<AStarProgress> const & progress, |
nothing calls this directly
no test coverage detected