Class MinimumEdgeCutAllStAbstract

  • All Implemented Interfaces:
    MinimumEdgeCutAllSt
    Direct Known Subclasses:
    MinimumEdgeCutAllStPicardQueyranne

    public abstract class MinimumEdgeCutAllStAbstract
    extends Object
    implements MinimumEdgeCutAllSt
    Abstract class for computing all minimum edge cuts between two terminal nodes.

    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

      • MinimumEdgeCutAllStAbstract

        public MinimumEdgeCutAllStAbstract()
        Default constructor.
    • Method Detail

      • minimumCutsIter

        public <V,​E> Iterator<VertexBiPartition<V,​E>> minimumCutsIter​(Graph<V,​E> g,
                                                                                  WeightFunction<E> w,
                                                                                  V source,
                                                                                  V sink)
        Description copied from interface: MinimumEdgeCutAllSt
        Iterate over all the minimum edge-cuts in a graph between two terminal vertices.

        Given a graph \(G=(V,E)\), an edge-cut is a partition of \(V\) into twos sets \(C, \bar{C} = V \setminus C\). The return value of this function is an iterator over all the partitions to these two sets with minimum weight.

        If g is an IntGraph, the returned iterator will iterate over IVertexBiPartition objects. In that case, its better to pass a IWeightFunction as w to avoid boxing/unboxing.

        Specified by:
        minimumCutsIter in interface MinimumEdgeCutAllSt
        Type Parameters:
        V - the vertices type
        E - the edges type
        Parameters:
        g - a graph
        w - an edge weight function
        source - the source vertex
        sink - the sink vertex
        Returns:
        an iterator over all the minimum edge-cuts