| 31 | using TarjanEdge = util::static_graph_details::SortableEdgeWithData<void>; |
| 32 | |
| 33 | std::size_t loadGraph(const std::string &path, |
| 34 | std::vector<util::Coordinate> &coordinate_list, |
| 35 | extractor::PackedOSMIDs &osm_node_ids, |
| 36 | std::vector<TarjanEdge> &graph_edge_list) |
| 37 | { |
| 38 | std::vector<extractor::NodeBasedEdge> edge_list; |
| 39 | |
| 40 | extractor::files::readRawNBGraph(path, coordinate_list, osm_node_ids, edge_list); |
| 41 | |
| 42 | // Building a node-based graph |
| 43 | for (const auto &input_edge : edge_list) |
| 44 | { |
| 45 | if (input_edge.source == input_edge.target) |
| 46 | { |
| 47 | continue; |
| 48 | } |
| 49 | |
| 50 | if (input_edge.flags.forward) |
| 51 | { |
| 52 | graph_edge_list.emplace_back(input_edge.source, input_edge.target); |
| 53 | } |
| 54 | |
| 55 | if (input_edge.flags.backward) |
| 56 | { |
| 57 | graph_edge_list.emplace_back(input_edge.target, input_edge.source); |
| 58 | } |
| 59 | } |
| 60 | |
| 61 | return osm_node_ids.size(); |
| 62 | } |
| 63 | |
| 64 | struct FeatureWriter |
| 65 | { |
no test coverage detected