Package com.jgalgo.alg.cover
Class EdgeCoverAbstract
java.lang.Object
com.jgalgo.alg.cover.EdgeCoverAbstract
- All Implemented Interfaces:
EdgeCover
- Direct Known Subclasses:
EdgeCoverCardinality
,EdgeCoverWeighted
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
-
Method Summary
Modifier and TypeMethodDescription<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.
-
Constructor Details
-
EdgeCoverAbstract
public EdgeCoverAbstract()Default constructor.
-
-
Method Details
-
computeMinimumEdgeCover
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
-