Ignore:
Timestamp:
Sep 17, 2010, 1:09:06 PM (14 years ago)
Author:
gnappo
Message:

Ulteriori refactoring. Creato il clusterer metisMqi, con opzioni.

File:
1 edited

Legend:

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

    r11 r14  
    44import java.util.Stack;
    55
    6 import weka.clusterers.forMetisMQI.coarse.CoarserGraphElement;
    76import weka.clusterers.forMetisMQI.graph.Bisection;
    87import weka.clusterers.forMetisMQI.graph.Node;
    98import weka.clusterers.forMetisMQI.graph.Subgraph;
    109import weka.clusterers.forMetisMQI.graph.UndirectedGraph;
     10import weka.clusterers.forMetisMQI.util.CoarserGraphElement;
    1111
    1212public class Uncoarse {
    1313       
    14         private boolean projectedBelongs(Node u, Bisection partition, CoarserGraphElement cge) {
     14        private static boolean projectedBelongs(Node u, Bisection partition, CoarserGraphElement cge) {
    1515                Subgraph s = partition.getSubgraph();
    1616                Node mappedNode = cge.getMap().get(u);
     
    2424         * @param cge
    2525         */
    26         public Bisection uncoarseOneStep(Bisection partition, CoarserGraphElement cge) {
     26        private static Bisection uncoarseOneStep(Bisection partition, CoarserGraphElement cge) {
    2727                UndirectedGraph projected = cge.getProjected();
    2828                Subgraph part = new Subgraph(projected);
     
    3636        }
    3737       
    38         public Bisection uncoarse(Stack<CoarserGraphElement> stack, Bisection partition) {
     38        /**
     39         * Given a bisection of the finer graph and the stack of graphs which yielded the finer graph,
     40         * it returns the bisection projected into the coarser graph.
     41         * @param stack
     42         * @param partition
     43         * @return
     44         */
     45        public static Bisection uncoarse(Stack<CoarserGraphElement> stack, Bisection partition) {
    3946                while(stack.size() > 0) {
    4047                        CoarserGraphElement element = stack.pop();
     
    4350                return partition;
    4451        }
    45        
    46         public Uncoarse() {
    47         }
    48 
    4952}
Note: See TracChangeset for help on using the changeset viewer.