Changeset 8 for src/main/java/weka/clusterers/forMetisMQI/KLPartition.java
- Timestamp:
- Sep 11, 2010, 4:12:16 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/weka/clusterers/forMetisMQI/KLPartition.java
r7 r8 33 33 a = new Subgraph(g); 34 34 b = new Subgraph(g); 35 Random r = Random.instance(); 36 for(int i=0;i<g.size();i++) { 37 if(r.nextBoolean()) 38 a.addNode(g.getLabel(i)); 35 Iterator<Integer> graph = g.vtxsPermutation().iterator(); 36 int i = 0; 37 while(graph.hasNext()) { 38 int u = graph.next(); 39 if((i%2)==0) 40 a.addNode(u); 39 41 else 40 b.addNode(g.getLabel(i)); 42 b.addNode(u); 43 i++; 41 44 } 42 45 marked = new ArrayList<Integer>();
Note: See TracChangeset
for help on using the changeset viewer.