Example #1
0
  public void countMinCuts(int n) throws IOException {
    MinCut minCut = new MinCut();
    minCut.readAdjList();

    for (int i = 1; i <= n; i++) {
      minCut.createCopy();
      minCut.contract();
      int thisCut = minCut.countEdges();
      if (min > thisCut) {
        min = thisCut;
      }
      System.out.println("The " + i + "th try: " + thisCut + " Min cut: " + min);
    }
  }