Adds a special graph for MLD with effcient boundary scan

This graph enables efficient boundary edge scans at each level.
Currenly this needs about |V|*|L| bytes of storage.
We can optimize this when the highest boundary nodes ID is << |V|.
This commit is contained in:
Patrick Niklaus
2017-03-07 03:59:28 +00:00
committed by Patrick Niklaus
parent 58681fa7ea
commit 655ca803d8
12 changed files with 518 additions and 131 deletions
@@ -143,15 +143,14 @@ void routingStep(const datafacade::ContiguousInternalMemoryDataFacade<algorithm:
}
// Boundary edges
for (const auto edge : facade.GetAdjacentEdgeRange(node))
for (const auto edge : facade.GetBorderEdgeRange(level, node))
{
const auto &edge_data = facade.GetEdgeData(edge);
if (DIRECTION == FORWARD_DIRECTION ? edge_data.forward : edge_data.backward)
{
const NodeID to = facade.GetTarget(edge);
if (checkParentCellRestriction(partition.GetCell(level + 1, to), args...) &&
partition.GetHighestDifferentLevel(node, to) >= level)
if (checkParentCellRestriction(partition.GetCell(level + 1, to), args...))
{
BOOST_ASSERT_MSG(edge_data.weight > 0, "edge_weight invalid");
const EdgeWeight to_weight = weight + edge_data.weight;