- Timestamp:
- Sep 14, 2010, 2:11:28 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/weka/clusterers/forMetisMQI/GraphAlgorithms.java
r8 r9 5 5 public class GraphAlgorithms { 6 6 7 public KLPartition KL( Graph g) {7 public KLPartition KL(UndirectedGraph g) { 8 8 KLPartition partition = new KLPartition(g); 9 9 KLPartition result = partition; 10 10 int bestEdgeCut = Integer.MAX_VALUE; 11 intu = partition.getCandidate();12 while(u != -1) {11 Node u = partition.getCandidate(); 12 while(u != null) { 13 13 partition.swap(u); 14 14 if(partition.edgeCut() <= bestEdgeCut) { 15 15 bestEdgeCut = partition.edgeCut(); 16 result = partition.c lone();16 result = partition.copy(); 17 17 } 18 18 u = partition.getCandidate(); … … 21 21 } 22 22 23 public void METIS( Graph g) {23 public void METIS(UndirectedGraph g) { 24 24 KLPartition partition = null; 25 25 Coarse.setFinerSize(10);
Note: See TracChangeset
for help on using the changeset viewer.