/**
 * Implementation of the minimum-cost flow algorithm based on
 * successive augmentations along minimum-cost paths.  The algorithm
 * assumes that the graph has no negative-weight edges.  The
 * implemetation uses the template-method pattern.
 */
public abstract class MinCostFlowTemplate {

  // instance variables
  protected MinCostFlowDijkstra dijkstra_;
  protected InspectableGraph graph_;
  protected Vertex source_;
  protected Vertex dest_;
  protected boolean finished_;
  protected int maximumFlow_;
  protected int targetFlow_;

  // various constants
  public final int ZERO = 0;
  public final int INFINITY = Integer.MAX_VALUE;

  // node decorations
  private final Object FLOW            = new Object();
  private final Object DISTANCE        = new Object();