Restructure the construction of the undirected graph

This commit is contained in:
Patrick Niklaus
2015-06-29 00:42:22 +02:00
parent 4a7451682b
commit 021a1c7a39
7 changed files with 169 additions and 230 deletions
+3 -2
View File
@@ -6,6 +6,8 @@
#include "../data_structures/restriction_map.hpp"
#include "../data_structures/percent.hpp"
#include "../util/simple_logger.hpp"
GraphCompressor::GraphCompressor(const SpeedProfileProperties& speed_profile)
: speed_profile(speed_profile)
{
@@ -59,8 +61,7 @@ void GraphCompressor::Compress(const std::unordered_set<NodeID>& barrier_nodes,
//
// If the edges are compatible.
const bool reverse_edge_order =
!(graph.GetEdgeData(graph.BeginEdges(node_v)).forward);
const bool reverse_edge_order = graph.GetEdgeData(graph.BeginEdges(node_v)).reversed;
const EdgeID forward_e2 = graph.BeginEdges(node_v) + reverse_edge_order;
BOOST_ASSERT(SPECIAL_EDGEID != forward_e2);
BOOST_ASSERT(forward_e2 >= graph.BeginEdges(node_v) &&