Examples of AStarShortestPathFinder


Examples of org.geotools.graph.path.AStarShortestPathFinder

          );
        }
    }
      Factory f = new Factory();
     
      AStarShortestPathFinder walker =
          new AStarShortestPathFinder(builder().getGraph(),root,((Node) map.get("0.1.0.1")),
                                  f.createFunctions(((Node) map.get("0.1.0.1"))));
     
      walker.calculate();
      MyVisitor visitor = new MyVisitor();
      builder().getGraph().visitNodes(visitor);
      //#1
      assertTrue(visitor.count > 0);
      assertTrue(visitor.count < map.size() + 1);
      Path p = null;
    try {
      p = walker.getPath();
    } catch (Exception e) {
      e.printStackTrace();
    }
      p.getEdges();
      assertTrue(p.size() == 4);
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.