Package org.geotools.graph.util.graph

Examples of org.geotools.graph.util.graph.GraphPartitioner


   */
  public void test_0() {
    int nnodes = 100;
    GraphTestUtil.buildNoBifurcations(builder(), nnodes);
   
    GraphPartitioner partitioner = new GraphPartitioner(builder().getGraph());
    partitioner.partition();
   
    List partitions = partitioner.getPartitions();
   
    assertTrue(partitions.size() == 1);
   
    //ensure every node in the original graph is in the new graph
    final Graph g = (Graph)partitions.get(0);
View Full Code Here


    Node lc = (Node)id2node.get("0.0");
    Node rc = (Node)id2node.get("0.1");
   
    builder().removeNode(root);
   
    GraphPartitioner parter = new GraphPartitioner(builder().getGraph());
    parter.partition();
   
    List partitions = parter.getPartitions();
   
    assertTrue(partitions.size() == 2);
   
    Graph left = (Graph)partitions.get(0);
    Graph right = (Graph)partitions.get(1);
View Full Code Here

TOP

Related Classes of org.geotools.graph.util.graph.GraphPartitioner

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.