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

Method PrintStatistics

src/extractor/graph_compressor.cpp:372–390  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

370}
371
372void GraphCompressor::PrintStatistics(unsigned original_number_of_nodes,
373 unsigned original_number_of_edges,
374 const util::NodeBasedDynamicGraph &graph) const
375{
376
377 unsigned new_node_count = 0;
378 unsigned new_edge_count = 0;
379
380 for (const auto i : util::irange(0u, graph.GetNumberOfNodes()))
381 {
382 if (graph.GetOutDegree(i) > 0)
383 {
384 ++new_node_count;
385 new_edge_count += (graph.EndEdges(i) - graph.BeginEdges(i));
386 }
387 }
388 util::Log() << "Node compression ratio: " << new_node_count / (double)original_number_of_nodes;
389 util::Log() << "Edge compression ratio: " << new_edge_count / (double)original_number_of_edges;
390}
391} // namespace osrm::extractor

Callers 1

runMethod · 0.45

Calls 6

irangeFunction · 0.85
LogClass · 0.85
GetNumberOfNodesMethod · 0.45
GetOutDegreeMethod · 0.45
EndEdgesMethod · 0.45
BeginEdgesMethod · 0.45

Tested by

no test coverage detected