@Test public void noObstaclesPolylineRoute() { Vector s = new Vector(100, 0); Vector e = new Vector(200, 200); List<Vector> r = o.findRoute(s, e); assertTrue(r.size() == 3); assertEquals(s, r.get(0)); assertEquals(new Vector(100, 200), r.get(1)); assertEquals(e, r.get(2)); }
public List<Vector> findRoute(Vector start, Vector end) { if (start.equals(end)) { List<Vector> path = new ArrayList<>(); path.add(start); return path; } initRouting(start, end); if (DEBUG) { validateLines(); } return findPath(); }
OrthogonalRouteWithObstacles { public List<Vector> findRoute(Vector start, Vector end) { if (start.equals(end)) { List<Vector> path = new ArrayList<>(); path.add(start); return path; } initRouting(start, end); if (DEBUG) { validateLines(); } return findPath(); } }
OrthogonalRouteWithObstacles { public List<Vector> findRoute(Vector start, Vector end) { if (start.equals(end)) { List<Vector> path = new ArrayList<>(); path.add(start); return path; } initRouting(start, end); if (DEBUG) { validateLines(); } return findPath(); } OrthogonalRouteWithObstacles();  OrthogonalRouteWithObstacles(List<Rectangle> obstacles); }
OrthogonalRouteWithObstacles { public List<Vector> findRoute(Vector start, Vector end) { if (start.equals(end)) { List<Vector> path = new ArrayList<>(); path.add(start); return path; } initRouting(start, end); if (DEBUG) { validateLines(); } return findPath(); } OrthogonalRouteWithObstacles();  OrthogonalRouteWithObstacles(List<Rectangle> obstacles); long getBuildInitTime(); long getBuildLazyTime(); long getInitRoutingTime(); long getForbiddenSegmentsTime(); long getAdditionalLinesTime(); long getInitTime(); List<Vector> findRoute(Vector start, Vector end); void addAdditionalLines(List<Segment> additionalLines); void addForbiddenSegments(List<Segment> forbiddenSegments); void setMinDistToForbiddenSegment(int minDistToForbiddenSegment); }
OrthogonalRouteWithObstacles { public List<Vector> findRoute(Vector start, Vector end) { if (start.equals(end)) { List<Vector> path = new ArrayList<>(); path.add(start); return path; } initRouting(start, end); if (DEBUG) { validateLines(); } return findPath(); } OrthogonalRouteWithObstacles();  OrthogonalRouteWithObstacles(List<Rectangle> obstacles); long getBuildInitTime(); long getBuildLazyTime(); long getInitRoutingTime(); long getForbiddenSegmentsTime(); long getAdditionalLinesTime(); long getInitTime(); List<Vector> findRoute(Vector start, Vector end); void addAdditionalLines(List<Segment> additionalLines); void addForbiddenSegments(List<Segment> forbiddenSegments); void setMinDistToForbiddenSegment(int minDistToForbiddenSegment);  }