Ignore:
Timestamp:
Sep 16, 2010, 10:44:40 AM (14 years ago)
Author:
gnappo
Message:

Un po' di refactoring e implementazione dell'algoritmo di raffinamento.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main/java/weka/clusterers/forMetisMQI/GraphAlgorithms.java

    r10 r11  
    33import java.util.Stack;
    44
     5import weka.clusterers.forMetisMQI.coarse.Coarse;
     6import weka.clusterers.forMetisMQI.coarse.CoarserGraphElement;
     7import weka.clusterers.forMetisMQI.graph.Bisection;
     8import weka.clusterers.forMetisMQI.graph.Node;
     9import weka.clusterers.forMetisMQI.graph.UndirectedGraph;
     10
    511public class GraphAlgorithms {
    612       
    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;
    1016                int bestEdgeCut = Integer.MAX_VALUE;
    1117                Node u = partition.getCandidate();
     
    2228       
    2329        public void METIS(UndirectedGraph g) {
    24                 KLPartition partition = null;
     30                MQI.viewGraph(g);
     31                Bisection partition = null;
    2532                Coarse.setFinerSize(8);
    2633                Stack<CoarserGraphElement> stack = Coarse.coarse(g);
    27                
    2834                if(stack.size() > 0) {
    2935                        partition = KL(stack.peek().getContracted());
     
    3238                        System.out.println(partition.toString());
    3339                }
    34                
    35                 MQI.start(partition);
     40                System.out.println("AAAAAA");
     41                System.out.println(MQI.mqi(partition).toString());
    3642               
    3743        }
Note: See TracChangeset for help on using the changeset viewer.