blob: 5059bacd94eaf182c2d2ce7a9079767632942749 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
#pragma once
#include "routing/road_graph.hpp"
#include "geometry/point2d.hpp"
#include <cstdint>
#include <tuple>
#include <vector>
namespace openlr
{
using Edge = routing::Edge;
using EdgeVector = routing::RoadGraphBase::EdgeVector;
using Score = uint32_t;
struct ScorePoint
{
ScorePoint() = default;
ScorePoint(Score score, m2::PointD const & point) : m_score(score), m_point(point) {}
bool operator<(ScorePoint const & o) const
{
return std::tie(m_score, m_point) < std::tie(o.m_score, o.m_point);
}
bool operator==(ScorePoint const & o) const
{
return m_score == o.m_score && m_point == o.m_point;
}
Score m_score = 0;
m2::PointD m_point;
};
using ScorePointVec = std::vector<ScorePoint>;
struct ScoreEdge
{
ScoreEdge(Score score, Edge const & edge) : m_score(score), m_edge(edge) {}
Score m_score;
Edge m_edge;
};
using ScoreEdgeVec = std::vector<ScoreEdge>;
struct ScorePath
{
ScorePath(Score score, EdgeVector && path) : m_score(score), m_path(move(path)) {}
Score m_score;
EdgeVector m_path;
};
using ScorePathVec = std::vector<ScorePath>;
} // namespace openlr
|