net.sourceforge.combean.interfaces.graph.alg.spath
Interface NegativeCycleDetectionAlg<NumType extends Comparable<NumType>>
- All Superinterfaces:
- GraphAlgorithm, ShortestPathAlg<NumType>
- All Known Subinterfaces:
- SingleSourceShortestPathWithNegCycleDetectionAlg<NumType>
- All Known Implementing Classes:
- BellmanFordWithNegCycleDetectionAlg
public interface NegativeCycleDetectionAlg<NumType extends Comparable<NumType>>
- extends ShortestPathAlg<NumType>
A shortest path algorithm which is also able to detected negative cycles
hasNegativeCycle
boolean hasNegativeCycle()
- Check whether a negative cycle has been found
- Returns:
- true if a negative cycle has been found
getNegativeCycle
FixedPath getNegativeCycle()