Changeset 9 for src/main/java/weka/clusterers/forMetisMQI/Uncoarse.java
- Timestamp:
- Sep 14, 2010, 2:11:28 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/weka/clusterers/forMetisMQI/Uncoarse.java
r7 r9 6 6 public class Uncoarse { 7 7 8 private boolean projectedBelongs( intu, KLPartition partition, CoarserGraphElement cge) {8 private boolean projectedBelongs(Node u, KLPartition partition, CoarserGraphElement cge) { 9 9 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); 12 11 return s.contains(mappedNode); 13 12 } … … 20 19 */ 21 20 public KLPartition uncoarseOneStep(KLPartition partition, CoarserGraphElement cge) { 22 Graph projected = cge.getProjected();21 UndirectedGraph projected = cge.getProjected(); 23 22 Subgraph part = new Subgraph(projected); 24 Iterator< Integer> projectedIterator = projected.iterator();23 Iterator<Node> projectedIterator = projected.getVertices().iterator(); 25 24 while(projectedIterator.hasNext()) { 26 intu = projectedIterator.next();25 Node u = projectedIterator.next(); 27 26 if(projectedBelongs(u,partition,cge)) 28 part.add Node(u);27 part.addVertex(u); 29 28 } 30 29 return new KLPartition(part);
Note: See TracChangeset
for help on using the changeset viewer.