Examples of CycleDetector


Examples of org._3pq.jgrapht.alg.CycleDetector

    }
    /*
     * find the id's participating in the cycle, and return the intersection
     * with set of id's which actually produce references.
     */
    CycleDetector cd = new CycleDetector(dg);
    Set<String> cycleIds = cd.findCycles();
    cycleIds.retainAll(nodeRefs.keySet());
    return cycleIds;
  }
View Full Code Here

Examples of org.geotools.graph.util.graph.CycleDetector

   * Expected: 1. containsCycle() returns false
   */
  public void test_0() {
    GraphTestUtil.buildNoBifurcations(builder(), 100);
   
    CycleDetector detector = new CycleDetector(builder().getGraph());
    assertTrue(!detector.containsCycle());  
  }
View Full Code Here

Examples of org.geotools.graph.util.graph.CycleDetector

   * Expected: 1. containsCycle returns true
   */
  public void test_1() {
    GraphTestUtil.buildCircular(builder(), 100);
   
    CycleDetector detector = new CycleDetector(builder().getGraph());
    assertTrue(detector.containsCycle());
  }
View Full Code Here

Examples of org.geotools.graph.util.graph.CycleDetector

    }
   
    Graph graph = gg.getGraph();
   
    //test the graph for cycles
    CycleDetector cycleDetector = new DirectedCycleDetector(graph);
    if (cycleDetector.containsCycle()) {
      logger.info("Cycle found");
      return null;
    }
      
   
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.