Class MinimumMeanCycleAbstract

    • Constructor Detail

      • MinimumMeanCycleAbstract

        public MinimumMeanCycleAbstract()
        Default constructor.
    • Method Detail

      • computeMinimumMeanCycle

        public <V,​E> Path<V,​E> computeMinimumMeanCycle​(Graph<V,​E> g,
                                                                   WeightFunction<E> w)
        Description copied from interface: MinimumMeanCycle
        Compute the minimum mean cycle in a graph.

        If g is an IntGraph, a IPath object will be returned. In that case, its better to pass a IWeightFunction as w to avoid boxing/unboxing.

        Specified by:
        computeMinimumMeanCycle in interface MinimumMeanCycle
        Type Parameters:
        V - the vertices type
        E - the edges type
        Parameters:
        g - a graph
        w - an edge weight function
        Returns:
        the cycle with the minimum mean weight in the graph, or null if no cycles were found