mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-21 13:53:37 +00:00
Organic Maps sources as of 02.04.2025 (fad26bbf22ac3da75e01e62aa01e5c8e11861005)
To expand with full Organic Maps and Maps.ME commits history run: git remote add om-historic [om-historic.git repo url] git fetch --tags om-historic git replace squashed-history historic-commits
This commit is contained in:
55
routing/leaps_graph.hpp
Normal file
55
routing/leaps_graph.hpp
Normal file
@@ -0,0 +1,55 @@
|
||||
#pragma once
|
||||
|
||||
#include "routing/base/astar_graph.hpp"
|
||||
#include "routing/base/astar_vertex_data.hpp"
|
||||
#include "routing/mwm_hierarchy_handler.hpp"
|
||||
#include "routing/route_weight.hpp"
|
||||
#include "routing/segment.hpp"
|
||||
|
||||
#include "geometry/latlon.hpp"
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace routing
|
||||
{
|
||||
class IndexGraphStarter;
|
||||
|
||||
class LeapsGraph : public AStarGraph<Segment, SegmentEdge, RouteWeight>
|
||||
{
|
||||
public:
|
||||
LeapsGraph(IndexGraphStarter & starter, MwmHierarchyHandler && hierarchyHandler);
|
||||
|
||||
// AStarGraph overrides:
|
||||
// @{
|
||||
void GetOutgoingEdgesList(astar::VertexData<Vertex, Weight> const & vertexData,
|
||||
EdgeListT & edges) override;
|
||||
void GetIngoingEdgesList(astar::VertexData<Vertex, Weight> const & vertexData,
|
||||
EdgeListT & edges) override;
|
||||
RouteWeight HeuristicCostEstimate(Segment const & from, Segment const & to) override;
|
||||
RouteWeight GetAStarWeightEpsilon() override;
|
||||
// @}
|
||||
|
||||
Segment const & GetStartSegment() const { return m_startSegment; }
|
||||
Segment const & GetFinishSegment() const { return m_finishSegment; }
|
||||
ms::LatLon const & GetPoint(Segment const & segment, bool front) const;
|
||||
|
||||
RouteWeight CalcMiddleCrossMwmWeight(std::vector<Segment> const & path);
|
||||
|
||||
private:
|
||||
void GetEdgesList(Segment const & segment, bool isOutgoing, EdgeListT & edges);
|
||||
|
||||
void GetEdgesListFromStart(EdgeListT & edges) const;
|
||||
void GetEdgesListToFinish(EdgeListT & edges) const;
|
||||
|
||||
private:
|
||||
ms::LatLon m_startPoint;
|
||||
ms::LatLon m_finishPoint;
|
||||
|
||||
Segment m_startSegment;
|
||||
Segment m_finishSegment;
|
||||
|
||||
IndexGraphStarter & m_starter;
|
||||
|
||||
MwmHierarchyHandler m_hierarchyHandler;
|
||||
};
|
||||
} // namespace routing
|
||||
Reference in New Issue
Block a user