forked from jgrapht/jgrapht
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add parameter for FW negative cycle detection
In b1f9e1e ("Implemented heuristics for Floyd-Warshall", Sat Jul 14 12:16:16 2018 +0300), some heuristics were added to improve the performance of the Floyd-Warshall algorithm. However, as an unintended consequence, the FW algorithm could no longer be used to detect negative cycles. Add a parameter to the algorithm constructor, maintaining the existing behavior, which enables users to detect negative cycle detection. Furthermore, add a method to check for negative cycles. This resolves jgrapht#1096. Signed-off-by: Kenny Ballou <kb@devnulllabs.io>
- Loading branch information
1 parent
5d5554c
commit fb191c3
Showing
2 changed files
with
51 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters