Package primitives.cluster

Examples of primitives.cluster.ClusterHead


        String s3 = m2.group(3);
        nodes.get(s1).connect(nodes.get(s2), s3);
      }
    }

    return new ClusterHead(g);

  }
View Full Code Here


//foo bar baz
public abstract class SILReader {

    public static ClusterHead clusterTreeBySIL(Graph g, File input) throws IOException {
        ClusterHead ret = new ClusterHead(g);


       
        BufferedReader in = new BufferedReader(new FileReader(input));
        String line;
View Full Code Here

                if(n != n2)
                    n.connect(n2, "");
            }
        }
       
        goodTree = new ClusterHead();
       
        for(Node n: g.getNodes()){
            ClusterNode cn = new ClusterNode();
            cn.addNode(n);
            goodTree.addChild(cn);
        }
       
        badTree = new ClusterHead();
       
        for(Node n: g.getNodes()){
            ClusterNode cn = new ClusterNode();
            cn.addNode(n);
            badTree.addChild(cn);
View Full Code Here

        "\n}";
  }
 
  @Test
  public void testBasic(){
    ClusterHead tree = null;
    try{
      tree = TreeLoader.loadTreeFromDot("/Users/mat/Documents/graphs/pump.dot");
    }catch(Exception e){
      fail("boo" +e);
    }
    ClusterUtils.prettyPrintTree(tree);
    System.out.println(tree.getCluster());
  }
View Full Code Here

    }

 
  @Test
  public void testOneSmallerComponentOneTreeLevel(){
    goodTree = new ClusterHead();
       
        ClusterNode mainThree = new ClusterNode();
    mainThree.addNode(nodes.get(0));
    mainThree.addNode(nodes.get(1));
    mainThree.addNode(nodes.get(2));
View Full Code Here

    testAreSame();
  }
 
    @Test
  public void testTwoOneElementClustersOneLevel(){
    goodTree = new ClusterHead();
       
        ClusterNode c1 = new ClusterNode();
    c1.addNode(nodes.get(0));
    c1.addNode(nodes.get(1));
   
View Full Code Here

    testAreSame();
  }
 
  @Test
  public void testTwoLevelClustersUnbalanced(){
    goodTree = new ClusterHead();
       
        ClusterNode c1 = new ClusterNode();
    c1.addNode(nodes.get(0));
    c1.addNode(nodes.get(1));
   
View Full Code Here

    testAreSame();
  }
 
    @Test
  public void twoLevelBalancedClusters(){
    goodTree = new ClusterHead();
       
        ClusterNode c1 = new ClusterNode();
    c1.addNode(nodes.get(0));
    c1.addNode(nodes.get(1));
   
View Full Code Here

TOP

Related Classes of primitives.cluster.ClusterHead

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.