| 370 | } |
| 371 | |
| 372 | void 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 |
no test coverage detected