Interface MinimumCycleMeanAlgorithm<V,​E>

Type Parameters:
V - graph vertex type
E - 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 Type Method Description
    GraphPath<V,​E> getCycle()
    Computes cycle with minimum mean.
    double getCycleMean()
    Computes minimum mean among all cycle.
  • Method Details

    • getCycleMean

      double getCycleMean()
      Computes minimum mean among all cycle. Returns Double.POSITIVE_INFINITY if no cycle has been found.
      Returns:
      minimum mean
    • getCycle

      GraphPath<V,​E> getCycle()
      Computes cycle with minimum mean. Returns $null$ if no cycle has been found.
      Returns:
      cycle with minimum mean