| 7 | namespace routing |
| 8 | { |
| 9 | class AStarSubProgress |
| 10 | { |
| 11 | public: |
| 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 | |
| 26 | private: |
| 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 | |
| 39 | class AStarProgress |
| 40 | { |
no outgoing calls
no test coverage detected