Store node ID's and weights separately in CompressedEdgeContainer

Removes CompressedEdges from the extractor and shared data format by
directly serializing vectors of node ID's, forward weights and reverse
weights for each node-based-edge

Refs #2575
This commit is contained in:
jakepruitt
2016-10-06 21:06:33 -07:00
committed by Jake Pruitt
parent ecee13bffa
commit 42271d99b2
7 changed files with 224 additions and 145 deletions
@@ -23,16 +23,7 @@ class CompressedEdgeContainer
EdgeWeight weight; // the weight of the edge leading to this node
};
struct CompressedEdge
{
public:
NodeID node_id;
EdgeWeight forward_weight;
EdgeWeight reverse_weight;
};
using OnewayEdgeBucket = std::vector<OnewayCompressedEdge>;
using EdgeBucket = std::vector<CompressedEdge>;
CompressedEdgeContainer();
void CompressEdge(const EdgeID surviving_edge_id,
@@ -67,7 +58,10 @@ class CompressedEdgeContainer
void IncreaseFreeList();
std::vector<OnewayEdgeBucket> m_compressed_oneway_geometries;
std::vector<EdgeBucket> m_compressed_geometries;
std::vector<unsigned> m_compressed_geometry_index;
std::vector<NodeID> m_compressed_geometry_nodes;
std::vector<EdgeWeight> m_compressed_geometry_fwd_weights;
std::vector<EdgeWeight> m_compressed_geometry_rev_weights;
std::vector<unsigned> m_free_list;
std::unordered_map<EdgeID, unsigned> m_edge_id_to_list_index_map;
std::unordered_map<EdgeID, unsigned> m_forward_edge_id_to_zipped_index_map;