net.sourceforge.combean.interfaces.graph.alg.spath
Interface NegativeCycleDetectionAlg<NumType extends Comparable<NumType>>

Package class diagram package NegativeCycleDetectionAlg
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


Method Summary
 FixedPath getNegativeCycle()
           
 boolean hasNegativeCycle()
          Check whether a negative cycle has been found
 
Methods inherited from interface net.sourceforge.combean.interfaces.graph.alg.spath.ShortestPathAlg
getCalcLengthOnly, setAlgebra, setCalcLengthOnly, setEdgeWeightMap
 
Methods inherited from interface net.sourceforge.combean.interfaces.graph.alg.GraphAlgorithm
getGraph, run, setGraph
 

Method Detail

hasNegativeCycle

boolean hasNegativeCycle()
Check whether a negative cycle has been found

Returns:
true if a negative cycle has been found

getNegativeCycle

FixedPath getNegativeCycle()