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/Uncoarse.java

    r9 r11  
    44import java.util.Stack;
    55
     6import weka.clusterers.forMetisMQI.coarse.CoarserGraphElement;
     7import weka.clusterers.forMetisMQI.graph.Bisection;
     8import weka.clusterers.forMetisMQI.graph.Node;
     9import weka.clusterers.forMetisMQI.graph.Subgraph;
     10import weka.clusterers.forMetisMQI.graph.UndirectedGraph;
     11
    612public class Uncoarse {
    713       
    8         private boolean projectedBelongs(Node u, KLPartition partition, CoarserGraphElement cge) {
     14        private boolean projectedBelongs(Node u, Bisection partition, CoarserGraphElement cge) {
    915                Subgraph s = partition.getSubgraph();
    1016                Node mappedNode = cge.getMap().get(u);
     
    1824         * @param cge
    1925         */
    20         public KLPartition uncoarseOneStep(KLPartition partition, CoarserGraphElement cge) {
     26        public Bisection uncoarseOneStep(Bisection partition, CoarserGraphElement cge) {
    2127                UndirectedGraph projected = cge.getProjected();
    2228                Subgraph part = new Subgraph(projected);
     
    2733                                part.addVertex(u);
    2834                }
    29                 return new KLPartition(part);
     35                return new Bisection(part);
    3036        }
    3137       
    32         public KLPartition uncoarse(Stack<CoarserGraphElement> stack, KLPartition partition) {
     38        public Bisection uncoarse(Stack<CoarserGraphElement> stack, Bisection partition) {
    3339                while(stack.size() > 0) {
    3440                        CoarserGraphElement element = stack.pop();
Note: See TracChangeset for help on using the changeset viewer.