Ignore:
Timestamp:
Oct 9, 2010, 12:24:38 PM (14 years ago)
Author:
gnappo
Message:

Aggiunto output in formato XML dei dati; modificato MQI (adesso cerca nella partizione piu` grande).

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  
    44import java.util.Iterator;
    55import java.util.Set;
     6
     7import weka.clusterers.forMetisMQI.util.Random;
    68
    79
     
    4244         */
    4345        public Bisection(UndirectedGraph g){
     46                double limitingProbabilities = 0.1;
    4447                this.g = g;
    4548                a = new Subgraph(g);
    4649                b = new Subgraph(g);
    4750                Iterator<Node> graph = g.vtxsPermutation().iterator();
    48                 int i = 0;
    4951                while(graph.hasNext()) {
    5052                        Node u = graph.next();
    51                         if((i%2)==0)
     53                        if(Random.instance().nextDouble() < limitingProbabilities)
    5254                                a.addVertex(u);
    5355                        else
    5456                                b.addVertex(u);
    55                         i++;
    5657                }
    5758                marked = new HashSet<Node>();
  • src/main/java/weka/clusterers/forMetisMQI/graph/UndirectedGraph.java

    r20 r26  
    99import java.util.TreeMap;
    1010
    11 import weka.clusterers.forMetisMQI.Random;
     11import weka.clusterers.forMetisMQI.util.Random;
    1212import weka.core.Attribute;
    1313import weka.core.Instance;
Note: See TracChangeset for help on using the changeset viewer.