com.mhhe.clrs2e
Class MaxFlow

java.lang.Object
  |
  +--com.mhhe.clrs2e.MaxFlow
Direct Known Subclasses:
EdmondsKarp

public abstract class MaxFlow
extends java.lang.Object

Abstract class for a maximum-flow algorithm.


Constructor Summary
MaxFlow()
           
 
Method Summary
abstract  void computeMaxFlow(com.mhhe.clrs2e.FlowNetwork g, com.mhhe.clrs2e.Vertex s, com.mhhe.clrs2e.Vertex t)
          Finds a maximum flow in a flow network from a given source to a given sink.
 void zeroFlow(com.mhhe.clrs2e.FlowNetwork g)
          Initializes the flow in a flow network to 0.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MaxFlow

public MaxFlow()
Method Detail

computeMaxFlow

public abstract void computeMaxFlow(com.mhhe.clrs2e.FlowNetwork g,
                                    com.mhhe.clrs2e.Vertex s,
                                    com.mhhe.clrs2e.Vertex t)
Finds a maximum flow in a flow network from a given source to a given sink.

Parameters:
g - The flow network.
s - The source vertex.
t - The sink vertex.

zeroFlow

public void zeroFlow(com.mhhe.clrs2e.FlowNetwork g)
Initializes the flow in a flow network to 0.

Parameters:
g - The flow network.