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

Class AStarSubProgress

libs/routing/base/astar_progress.hpp:9–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7namespace routing
8{
9class AStarSubProgress
10{
11public:
12 AStarSubProgress(ms::LatLon const & start, ms::LatLon const & finish, double contributionCoef);
13
14 explicit AStarSubProgress(double contributionCoef);
15
16 double UpdateProgress(ms::LatLon const & current, ms::LatLon const & finish);
17 /// \brief Some |AStarSubProgress| could have their own subProgresses (next item in
18 /// AStarProgress::m_subProgresses after current), in order to return true progress
19 /// back to the upper level of subProgresses, we should do progress backpropagation of
20 /// subProgress of current subProgress - |subSubProgressValue|
21 double UpdateProgress(double subSubProgressValue);
22
23 void Flush(double progress);
24 double GetMaxContribution() const;
25
26private:
27 static double CalcDistance(ms::LatLon const & from, ms::LatLon const & to);
28
29 double m_currentProgress = 0.0;
30 double m_contributionCoef = 0.0;
31 double m_fullDistance = 0.0;
32 double m_forwardDistance = 0.0;
33 double m_backwardDistance = 0.0;
34
35 ms::LatLon m_startPoint;
36 ms::LatLon m_finishPoint;
37};
38
39class AStarProgress
40{

Callers 2

AStarProgressMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected