- Type Parameters:
V
- graph vertex typeE
- graph edge type
- All Known Implementing Classes:
HowardMinimumMeanCycle
public interface MinimumCycleMeanAlgorithm<V,E>
The algorithm for finding minimum cycle mean in a graph.
Consider a cycle $C$ in a graph. The mean of cycle $C$ is defined as $\lambda (C)=\frac{w(C)}{|C|}$, where $w(C)$ is the total weight of $C$ and $|C|$ is the length of $C$.
-
Method Summary
Modifier and TypeMethodDescriptiongetCycle()
Computes cycle with minimum mean.double
Computes minimum mean among all cycle.
-
Method Details
-
getCycleMean
double getCycleMean()Computes minimum mean among all cycle. ReturnsDouble.POSITIVE_INFINITY
if no cycle has been found.- Returns:
- minimum mean
-
getCycle
Computes cycle with minimum mean. Returns $null$ if no cycle has been found.- Returns:
- cycle with minimum mean
-