Linkgraph: Do not pre-fill annos set at start of MCF Dijkstra

This commit is contained in:
Jonathan G Rennison 2018-01-15 18:51:36 +00:00
parent 4a420ef864
commit cd68e9fac7

View File

@ -384,7 +384,7 @@ void MultiCommodityFlow::Dijkstra(NodeID source_node, PathVector &paths)
for (NodeID node = 0; node < size; ++node) {
AnnosWrapper<Tannotation> *anno = new (this->job.path_allocator.Allocate()) AnnosWrapper<Tannotation>(node, node == source_node);
anno->UpdateAnnotation();
anno->self_iter = annos.insert(AnnoSetItem<Tannotation>(anno)).first;
anno->self_iter = (node == source_node) ? annos.insert(AnnoSetItem<Tannotation>(anno)).first : annos.end(); // only insert the source node, the other nodes will be added as reached
paths[node] = anno;
}
while (!annos.empty()) {