Examples of containsCycle()


Examples of com.clearnlp.dependency.DEPTree.containsCycle()

  private DEPTree getDEPTree(CTTree cTree)
  {
    DEPTree dTree = initDEPTree(cTree);
    addDEPHeads(dTree, cTree);
   
    if (dTree.containsCycle())
      System.err.println("Error: cyclic dependencies exist");
   
    splitLabels(dTree);
    addXHeads(dTree);
    addFeats(dTree, cTree, cTree.getRoot());
View Full Code Here

Examples of com.clearnlp.dependency.DEPTree.containsCycle()

  private DEPTree getDEPTree(CTTree cTree)
  {
    DEPTree dTree = initDEPTree(cTree);
    addDEPHeads(dTree, cTree);
   
    if (dTree.containsCycle())
      System.err.println("Error: cyclic dependencies exist");
   
    return dTree;
  }
 
View Full Code Here

Examples of org.geotools.graph.util.graph.CycleDetector.containsCycle()

   */
  public void test_0() {
    GraphTestUtil.buildNoBifurcations(builder(), 100);
   
    CycleDetector detector = new CycleDetector(builder().getGraph());
    assertTrue(!detector.containsCycle());  
  }
 
  /**
   * Create a graph that contains a cycle. <BR>
   * <BR>
 
View Full Code Here

Examples of org.geotools.graph.util.graph.CycleDetector.containsCycle()

   */
  public void test_1() {
    GraphTestUtil.buildCircular(builder(), 100);
   
    CycleDetector detector = new CycleDetector(builder().getGraph());
    assertTrue(detector.containsCycle());
  }
 
  protected GraphBuilder createBuilder() {
    return(new BasicGraphBuilder())
  }
View Full Code Here

Examples of org.geotools.graph.util.graph.CycleDetector.containsCycle()

   
    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

Examples of org.geotools.graph.util.graph.DirectedCycleDetector.containsCycle()

   
    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.