Ignore:
Timestamp:
Sep 14, 2010, 2:11:28 PM (14 years ago)
Author:
gnappo
Message:

Migrato il resto del codice verso Jung.

File:
1 edited

Legend:

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

    r7 r9  
    66public class Uncoarse {
    77       
    8         private boolean projectedBelongs(int u, KLPartition partition, CoarserGraphElement cge) {
     8        private boolean projectedBelongs(Node u, KLPartition partition, CoarserGraphElement cge) {
    99                Subgraph s = partition.getSubgraph();
    10                 int index = cge.getProjected().getIndex(u);
    11                 int mappedNode = cge.getMap().get(index);
     10                Node mappedNode = cge.getMap().get(u);
    1211                return s.contains(mappedNode);
    1312        }
     
    2019         */
    2120        public KLPartition uncoarseOneStep(KLPartition partition, CoarserGraphElement cge) {
    22                 Graph projected = cge.getProjected();
     21                UndirectedGraph projected = cge.getProjected();
    2322                Subgraph part = new Subgraph(projected);
    24                 Iterator<Integer> projectedIterator = projected.iterator();
     23                Iterator<Node> projectedIterator = projected.getVertices().iterator();
    2524                while(projectedIterator.hasNext()) {
    26                         int u = projectedIterator.next();
     25                        Node u = projectedIterator.next();
    2726                        if(projectedBelongs(u,partition,cge))
    28                                 part.addNode(u);
     27                                part.addVertex(u);
    2928                }
    3029                return new KLPartition(part);
Note: See TracChangeset for help on using the changeset viewer.