Package org.geotools.graph.structure

Examples of org.geotools.graph.structure.Graph.queryNodes()


          if (node.getInDegree() == 0 || node.getOutDegree() == 0)
            return(Graph.PASS_AND_CONTINUE);
          return(Graph.FAIL_QUERY);
        }
      };
      assertTrue(after.queryNodes(visitor).size() == 2);
     
      visitor = new GraphVisitor() {
        public int visit(Graphable component) {
          DirectedNode node = (DirectedNode)component;
          if (node.getInDegree() == 1 || node.getOutDegree() == 1)
View Full Code Here


          if (node.getInDegree() == 0 && node.getOutDegree() == 2)
            return(Graph.PASS_AND_CONTINUE);
          return(Graph.FAIL_QUERY);
        }
      };
      assertTrue(after.queryNodes(visitor).size() == 1); //root
     
      visitor = new GraphVisitor() {
        public int visit(Graphable component) {
          DirectedNode node = (DirectedNode)component;
          if (node.getInDegree() == 1 && node.getOutDegree() == 2)
View Full Code Here

          if (node.getInDegree() == 1 && node.getOutDegree() == 2)
            return(Graph.PASS_AND_CONTINUE);
          return(Graph.FAIL_QUERY);
        }
      };
      assertTrue(after.queryNodes(visitor).size() == Math.pow(2,k)-2); //internal
     
      visitor = new GraphVisitor() {
        public int visit(Graphable component) {
          DirectedNode node = (DirectedNode)component;
          if (node.getInDegree() == 1 && node.getOutDegree() == 0)
View Full Code Here

          if (node.getInDegree() == 1 && node.getOutDegree() == 0)
            return(Graph.PASS_AND_CONTINUE);
          return(Graph.FAIL_QUERY);
        }
      };
      assertTrue(after.queryNodes(visitor).size() == Math.pow(2,k)); //leaves
    }
    catch(Exception e) {
      e.printStackTrace();
      assertTrue(false);
    }
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.