Skip to content

Commit

Permalink
Fixing issues #81 and #82
Browse files Browse the repository at this point in the history
  • Loading branch information
DennisOSRM committed Feb 3, 2012
1 parent 1f98659 commit 8a47c87
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions DataStructures/SearchEngine.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,15 +122,15 @@ class SearchEngine {
_forwardHeap2->Clear();
//insert new starting nodes into forward heap, adjusted by previous distances.
if(searchFrom1stStartNode) {
_forwardHeap->Insert(phantomNodePair.startPhantom.edgeBasedNode, distance1-phantomNodePair.startPhantom.weight1, phantomNodePair.startPhantom.edgeBasedNode);
_forwardHeap2->Insert(phantomNodePair.startPhantom.edgeBasedNode, distance2-phantomNodePair.startPhantom.weight1, phantomNodePair.startPhantom.edgeBasedNode);
_forwardHeap->Insert(phantomNodePair.startPhantom.edgeBasedNode, -phantomNodePair.startPhantom.weight1, phantomNodePair.startPhantom.edgeBasedNode);
_forwardHeap2->Insert(phantomNodePair.startPhantom.edgeBasedNode, -phantomNodePair.startPhantom.weight1, phantomNodePair.startPhantom.edgeBasedNode);
// INFO("1,2)forw insert " << phantomNodePair.startPhantom.edgeBasedNode << " with weight " << phantomNodePair.startPhantom.weight1);
// } else {
// INFO("Skipping first start node");
}
if(phantomNodePair.startPhantom.isBidirected() && searchFrom2ndStartNode) {
_forwardHeap->Insert(phantomNodePair.startPhantom.edgeBasedNode+1, distance1-phantomNodePair.startPhantom.weight2, phantomNodePair.startPhantom.edgeBasedNode+1);
_forwardHeap2->Insert(phantomNodePair.startPhantom.edgeBasedNode+1, distance2-phantomNodePair.startPhantom.weight2, phantomNodePair.startPhantom.edgeBasedNode+1);
_forwardHeap->Insert(phantomNodePair.startPhantom.edgeBasedNode+1, -phantomNodePair.startPhantom.weight2, phantomNodePair.startPhantom.edgeBasedNode+1);
_forwardHeap2->Insert(phantomNodePair.startPhantom.edgeBasedNode+1, -phantomNodePair.startPhantom.weight2, phantomNodePair.startPhantom.edgeBasedNode+1);
// INFO("1)forw insert " << phantomNodePair.startPhantom.edgeBasedNode+1 << " with weight " << distance1-phantomNodePair.startPhantom.weight1);
// INFO("2)forw insert " << phantomNodePair.startPhantom.edgeBasedNode+1 << " with weight " << distance2-phantomNodePair.startPhantom.weight1);
// } else if(!searchFrom2ndStartNode) {
Expand Down Expand Up @@ -324,7 +324,6 @@ class SearchEngine {
}
}

// INFO("-> dist " << _upperbound);
if ( _upperbound == INT_MAX ) {
return _upperbound;
}
Expand Down

0 comments on commit 8a47c87

Please sign in to comment.