Changeset 26 for src/main/java/weka/clusterers/forMetisMQI/graph
- Timestamp:
- Oct 9, 2010, 12:24:38 PM (14 years ago)
- Location:
- src/main/java/weka/clusterers/forMetisMQI/graph
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/weka/clusterers/forMetisMQI/graph/Bisection.java
r20 r26 4 4 import java.util.Iterator; 5 5 import java.util.Set; 6 7 import weka.clusterers.forMetisMQI.util.Random; 6 8 7 9 … … 42 44 */ 43 45 public Bisection(UndirectedGraph g){ 46 double limitingProbabilities = 0.1; 44 47 this.g = g; 45 48 a = new Subgraph(g); 46 49 b = new Subgraph(g); 47 50 Iterator<Node> graph = g.vtxsPermutation().iterator(); 48 int i = 0;49 51 while(graph.hasNext()) { 50 52 Node u = graph.next(); 51 if( (i%2)==0)53 if(Random.instance().nextDouble() < limitingProbabilities) 52 54 a.addVertex(u); 53 55 else 54 56 b.addVertex(u); 55 i++;56 57 } 57 58 marked = new HashSet<Node>(); -
src/main/java/weka/clusterers/forMetisMQI/graph/UndirectedGraph.java
r20 r26 9 9 import java.util.TreeMap; 10 10 11 import weka.clusterers.forMetisMQI. Random;11 import weka.clusterers.forMetisMQI.util.Random; 12 12 import weka.core.Attribute; 13 13 import weka.core.Instance;
Note: See TracChangeset
for help on using the changeset viewer.