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

Class GuidesGraph

libs/routing/guides_graph.hpp:41–70  ·  view source on GitHub ↗

Graph used in IndexGraphStarter for building routes through the guides tracks.

Source from the content-addressed store, hash-verified

39
40// Graph used in IndexGraphStarter for building routes through the guides tracks.
41class GuidesGraph
42{
43public:
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
63private:
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

Callers 1

SetGuidesGraphParamsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected