Skip to content

Dijkstra one to many zero distance issue - #708

Closed
IsNull wants to merge 3 commits into
graphhopper:masterfrom
ElderByte:DijkstraOneToMany-zeroDistance-issue
Closed

IsNull wants to merge 3 commits into
graphhopper:masterfrom
ElderByte:DijkstraOneToMany-zeroDistance-issue

Conversation

@IsNull

@IsNull IsNull commented Apr 25, 2016

Copy link
Copy Markdown

Unit test which exposes the issue #707

@karussell

karussell commented Apr 30, 2016 •

Copy link
Copy Markdown
Member

See the merged fix.

A cleaner fix would have been to move the finished method to:

if (finished())
  return currNode;
if (heap.isEmpty() || isMaxVisitedNodesExceeded() || isWeightLimitExceeded())
  return NOT_FOUND;

but this would add a (minor) overhead for nearly all other calculations, which for now seems to be unnecessary.

@karussell karussell closed this Apr 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants