MCPcopy Create free account
hub / github.com/comaps/comaps / ProcessJoints

Function ProcessJoints

libs/routing/index_router.cpp:657–682  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

655}
656
657vector<Segment> ProcessJoints(vector<JointSegment> const & jointsPath,
658 IndexGraphStarterJoints<IndexGraphStarter> & jointStarter)
659{
660 CHECK(!jointsPath.empty(), ());
661
662 vector<Segment> path;
663 for (auto const & joint : jointsPath)
664 {
665 vector<Segment> jointPath = jointStarter.ReconstructJoint(joint);
666 if (jointPath.empty())
667 continue;
668
669 if (path.empty())
670 {
671 path = std::move(jointPath);
672 continue;
673 }
674
675 auto begIter = jointPath.begin();
676 if (path.back() == jointPath.front())
677 ++begIter;
678 path.insert(path.end(), begIter, jointPath.end());
679 }
680
681 return path;
682}
683
684RouterResultCode IndexRouter::CalculateSubroute(Checkpoints const & checkpoints, size_t subrouteIdx,
685 RouterDelegate const & delegate,

Callers 2

CalcMethod · 0.85

Calls 7

ReconstructJointMethod · 0.80
backMethod · 0.80
frontMethod · 0.80
emptyMethod · 0.45
beginMethod · 0.45
insertMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected