Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ShortestPath now interrupts traversal if nodes belongs to disconnecte…
…d graphs ShortestPath is bidirectional. If one sides sees that other side is exhausted, that is, does not have any more nodes to traverse, it continues to search for hits in the current layer of nodes. Then it stops. This improves efficiency alot when searching for shortest path between disconnected graphs where difference in graph size is large. Moved TestShortestPath to matching package and changed visibility of MutableInteger private -> protected for usage in test. Correct formatting, imports and other PR comments
- Loading branch information