Interface MaximumFlowAlgorithm<V,​E>

    • Method Detail

      • getMaximumFlow

        MaximumFlowAlgorithm.MaximumFlow<E> getMaximumFlow​(V source,
                                                           V sink)
        Sets current source to source, current sink to sink, then calculates maximum flow from source to sink. Returns an object containing detailed information about the flow.
        Parameters:
        source - source of the flow inside the network
        sink - sink of the flow inside the network
        Returns:
        maximum flow
      • getMaximumFlowValue

        default double getMaximumFlowValue​(V source,
                                           V sink)
        Sets current source to source, current sink to sink, then calculates maximum flow from source to sink. Note, that source and sink must be vertices of the network passed to the constructor, and they must be different.
        Parameters:
        source - source vertex
        sink - sink vertex
        Returns:
        the value of the maximum flow