Interface MaximumFlowAlgorithm<V,E>

Type Parameters:
V - the graph vertex type
E - the graph edge type
All Superinterfaces:
FlowAlgorithm<V,E>
All Known Implementing Classes:
BoykovKolmogorovMFImpl, DinicMFImpl, EdmondsKarpMFImpl, GusfieldEquivalentFlowTree, GusfieldGomoryHuCutTree, MaximumFlowAlgorithmBase, PushRelabelMFImpl

public interface MaximumFlowAlgorithm<V,E> extends FlowAlgorithm<V,E>
Allows to derive maximum-flow from the supplied flow network
Author:
Alexey Kudinkin, Joris Kinable
  • Method Details

    • 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