- Timestamp:
- Sep 16, 2010, 10:44:40 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/weka/clusterers/forMetisMQI/GraphAlgorithms.java
r10 r11 3 3 import java.util.Stack; 4 4 5 import weka.clusterers.forMetisMQI.coarse.Coarse; 6 import weka.clusterers.forMetisMQI.coarse.CoarserGraphElement; 7 import weka.clusterers.forMetisMQI.graph.Bisection; 8 import weka.clusterers.forMetisMQI.graph.Node; 9 import weka.clusterers.forMetisMQI.graph.UndirectedGraph; 10 5 11 public class GraphAlgorithms { 6 12 7 public KLPartition KL(UndirectedGraph g) {8 KLPartition partition = new KLPartition(g);9 KLPartition result = partition;13 public Bisection KL(UndirectedGraph g) { 14 Bisection partition = new Bisection(g); 15 Bisection result = partition; 10 16 int bestEdgeCut = Integer.MAX_VALUE; 11 17 Node u = partition.getCandidate(); … … 22 28 23 29 public void METIS(UndirectedGraph g) { 24 KLPartition partition = null; 30 MQI.viewGraph(g); 31 Bisection partition = null; 25 32 Coarse.setFinerSize(8); 26 33 Stack<CoarserGraphElement> stack = Coarse.coarse(g); 27 28 34 if(stack.size() > 0) { 29 35 partition = KL(stack.peek().getContracted()); … … 32 38 System.out.println(partition.toString()); 33 39 } 34 35 MQI.start(partition);40 System.out.println("AAAAAA"); 41 System.out.println(MQI.mqi(partition).toString()); 36 42 37 43 }
Note: See TracChangeset
for help on using the changeset viewer.