Graph used in IndexGraphStarter for building routes through the guides tracks.
| 39 | |
| 40 | // Graph used in IndexGraphStarter for building routes through the guides tracks. |
| 41 | class GuidesGraph |
| 42 | { |
| 43 | public: |
| 44 | GuidesGraph() = default; |
| 45 | explicit GuidesGraph(double maxSpeedMpS, NumMwmId mwmId); |
| 46 | |
| 47 | Segment AddTrack(std::vector<geometry::PointWithAltitude> const & guideTrack, size_t requiredSegmentIdx); |
| 48 | |
| 49 | FakeEnding MakeFakeEnding(Segment const & segment, m2::PointD const & point, |
| 50 | geometry::PointWithAltitude const & projection) const; |
| 51 | |
| 52 | using EdgeListT = SmallList<SegmentEdge>; |
| 53 | void GetEdgeList(Segment const & segment, bool isOutgoing, EdgeListT & edges, RouteWeight const & prevWeight) const; |
| 54 | routing::LatLonWithAltitude const & GetJunction(Segment const & segment, bool front) const; |
| 55 | RouteWeight CalcSegmentWeight(Segment const & segment) const; |
| 56 | Segment FindSegment(Segment const & segment, size_t segmentIdx) const; |
| 57 | |
| 58 | // Returns back and front points of the segment. Segment belongs to one of the guides tracks. |
| 59 | std::pair<LatLonWithAltitude, LatLonWithAltitude> GetFromTo(Segment const & segment) const; |
| 60 | |
| 61 | NumMwmId GetMwmId() const; |
| 62 | |
| 63 | private: |
| 64 | double CalcSegmentTimeS(LatLonWithAltitude const & point1, LatLonWithAltitude const & point2) const; |
| 65 | |
| 66 | GuideSegments m_segments; |
| 67 | double m_maxSpeedMpS = 0.0; |
| 68 | NumMwmId m_mwmId = 0; |
| 69 | uint32_t m_curGuidesFeatrueId = 0; |
| 70 | }; |
| 71 | } // namespace routing |
no outgoing calls
no test coverage detected