| 20 | }; |
| 21 | |
| 22 | auto makeGraph(const MultiLevelPartition &mlp, const std::vector<MockEdge> &mock_edges) |
| 23 | { |
| 24 | struct EdgeData |
| 25 | { |
| 26 | bool forward; |
| 27 | bool backward; |
| 28 | }; |
| 29 | using Edge = util::static_graph_details::SortableEdgeWithData<EdgeData>; |
| 30 | std::vector<Edge> edges; |
| 31 | std::size_t max_id = 0; |
| 32 | for (const auto &m : mock_edges) |
| 33 | { |
| 34 | max_id = std::max<std::size_t>(max_id, std::max(m.source, m.target)); |
| 35 | edges.push_back(Edge{m.source, m.target, true, false}); |
| 36 | edges.push_back(Edge{m.target, m.source, false, true}); |
| 37 | } |
| 38 | std::sort(edges.begin(), edges.end()); |
| 39 | return MultiLevelGraph<EdgeData, osrm::storage::Ownership::Container>(mlp, max_id + 1, edges); |
| 40 | } |
| 41 | } // namespace |
| 42 | |
| 43 | BOOST_AUTO_TEST_SUITE(multi_level_graph) |
no test coverage detected