public static boolean hasNegativeCycle ( Object sourceOrDest , DirectedGraph g , Mode mode ) { return calcShortestDistances ( sourceOrDest , g , mode ) == null ; }
Determines if there are any negative cycles found .