Class 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 Detail

      • EdgeCoverAbstract

        public EdgeCoverAbstract()
        Default constructor.
    • 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 is IntGraph, the returned object is IntSet. If g is IntGraph, prefer to pass IWeightFunction for best performance.

        Specified by:
        computeMinimumEdgeCover in interface EdgeCover
        Type Parameters:
        V - the vertices type
        E - the edges type
        Parameters:
        g - a graph
        w - an edge weight function
        Returns:
        a minimum edge cover