Package com.jgalgo.alg.cycle
Class MinimumMeanCycleAbstract
java.lang.Object
com.jgalgo.alg.cycle.MinimumMeanCycleAbstract
- All Implemented Interfaces:
MinimumMeanCycle
- Direct Known Subclasses:
MinimumMeanCycleDasdanGupta,MinimumMeanCycleHoward
Abstract class for computing the cycle with minimum mean weight in a graph.
The class implements the interface by solving the problem on the index graph and then maps the results back to the original graph. The implementation for index graphs is abstract and left to the subclasses.
- Author:
- Barak Ugav
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<V,E> Path<V, E> computeMinimumMeanCycle(Graph<V, E> g, WeightFunction<E> w) Compute the minimum mean cycle in a graph.
-
Constructor Details
-
MinimumMeanCycleAbstract
public MinimumMeanCycleAbstract()Default constructor.
-
-
Method Details
-
computeMinimumMeanCycle
Description copied from interface:MinimumMeanCycleCompute the minimum mean cycle in a graph.If
gis anIntGraph, aIPathobject will be returned. In that case, its better to pass aIWeightFunctionaswto avoid boxing/unboxing.- Specified by:
computeMinimumMeanCyclein interfaceMinimumMeanCycle- Type Parameters:
V- the vertices typeE- the edges type- Parameters:
g- a graphw- an edge weight function- Returns:
- the cycle with the minimum mean weight in the graph, or
nullif no cycles were found
-