com.mhhe.clrs2e
Interface FlowNetworkEdgeIterator

All Superinterfaces:
java.util.Iterator
All Known Implementing Classes:
FlowNetwork.EdgeIterator

public interface FlowNetworkEdgeIterator
extends java.util.Iterator

Interface for an iterator that returns edges of a flow network.


Method Summary
 double getCapacity()
          Returns the capacity of the edge returned by the most recent call to next.
 java.lang.Object getEdge()
          Returns the edge found by the most recent call to next.
 double getNetFlow()
          Returns the net flow of the edge returned by the most recent call to next.
 double getResidualCapacity()
          Returns the residual capacity of the edge returned by the most recent call to next.
 void increaseNetFlow(double amount)
          Increases the net flow of the edge returned by the most recent call to next.
 void zeroNetFlow()
          Zeros out the net flow of the edge returned by the most recent call to next.
 
Methods inherited from interface java.util.Iterator
hasNext, next, remove
 

Method Detail

getEdge

public java.lang.Object getEdge()
Returns the edge found by the most recent call to next. Unlike next, this method returns an object corresponding to the edge itself rather than just the adjacent vertex.


getCapacity

public double getCapacity()
Returns the capacity of the edge returned by the most recent call to next.


getNetFlow

public double getNetFlow()
Returns the net flow of the edge returned by the most recent call to next.


getResidualCapacity

public double getResidualCapacity()
Returns the residual capacity of the edge returned by the most recent call to next.


zeroNetFlow

public void zeroNetFlow()
Zeros out the net flow of the edge returned by the most recent call to next.


increaseNetFlow

public void increaseNetFlow(double amount)
Increases the net flow of the edge returned by the most recent call to next.

Parameters:
amount - The amount by which this edge's flow is increased.