Package com.jgalgo.alg.cover
Class EdgeCoverAbstract
- java.lang.Object
-
- com.jgalgo.alg.cover.EdgeCoverAbstract
-
- All Implemented Interfaces:
EdgeCover
- Direct Known Subclasses:
EdgeCoverCardinality
,EdgeCoverWeighted
public abstract class EdgeCoverAbstract extends Object implements EdgeCover
Abstract class for computing a minimum edge cover.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 Constructor Description EdgeCoverAbstract()
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <V,E>
Set<E>computeMinimumEdgeCover(Graph<V,E> g, WeightFunction<E> w)
Compute a minimum edge cover of a graph with respect to an edge weight function.
-
-
-
Method Detail
-
computeMinimumEdgeCover
public <V,E> Set<E> computeMinimumEdgeCover(Graph<V,E> g, WeightFunction<E> w)
Description copied from interface:EdgeCover
Compute a minimum edge cover of a graph with respect to an edge weight function.If
g
isIntGraph
, the returned object isIntSet
. Ifg
isIntGraph
, prefer to passIWeightFunction
for best performance.- Specified by:
computeMinimumEdgeCover
in interfaceEdgeCover
- Type Parameters:
V
- the vertices typeE
- the edges type- Parameters:
g
- a graphw
- an edge weight function- Returns:
- a minimum edge cover
-
-