MCPcopy Create free account
hub / github.com/Project-OSRM/osrm-backend / writeEdgeBasedGraph

Function writeEdgeBasedGraph

include/extractor/files.hpp:75–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73
74template <typename EdgeBasedEdgeVector>
75void writeEdgeBasedGraph(const std::filesystem::path &path,
76 EdgeID const number_of_edge_based_nodes,
77 const EdgeBasedEdgeVector &edge_based_edge_list,
78 const std::uint32_t connectivity_checksum)
79{
80 static_assert(std::is_same<typename EdgeBasedEdgeVector::value_type, EdgeBasedEdge>::value, "");
81
82 storage::tar::FileWriter writer(path, storage::tar::FileWriter::GenerateFingerprint);
83
84 writer.WriteElementCount64("/common/number_of_edge_based_nodes", 1);
85 writer.WriteFrom("/common/number_of_edge_based_nodes", number_of_edge_based_nodes);
86 storage::serialization::write(writer, "/common/edge_based_edge_list", edge_based_edge_list);
87 writer.WriteElementCount64("/common/connectivity_checksum", 1);
88 writer.WriteFrom("/common/connectivity_checksum", connectivity_checksum);
89}
90
91// reads .osrm.ebg file
92template <typename EdgeBasedEdgeVector>

Callers 2

RunMethod · 0.85
runMethod · 0.85

Calls 3

writeFunction · 0.70
WriteElementCount64Method · 0.45
WriteFromMethod · 0.45

Tested by

no test coverage detected