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); } }
public static void main(String[] args) throws IOException { // TODO Auto-generated method stub MinCut minCut = new MinCut(); minCut.countMinCuts(10); }