1
0
Fork 0

Added shortcut if there is no possible way for shortest path

This commit is contained in:
Michael Hackstein 2015-04-23 19:58:27 -07:00
parent b56901f4d5
commit bf497d22b5
1 changed files with 2 additions and 1 deletions

View File

@ -128,6 +128,7 @@ void Traverser::searchFromVertex (
myInfo.mutex.unlock();
nextVertexIt = myInfo.queue.begin();
}
bingo = true;
// No possible path, can possibly terminate other thread
};
@ -161,7 +162,7 @@ Traverser::Path* Traverser::ShortestPath (VertexId const& start,
cout << forwardInfo.lookup.size() << backwardInfo.lookup.size() << endl;
if (!bingo) {
if (!bingo || intermediate == "") {
return nullptr;
}