@Test public void switchIntersectionByPathId() { List<FlowPath> paths = getFlowPaths(); FlowPath newPath = FlowPath.builder() .pathId(NEW_PATH_ID) .srcSwitch(makeSwitch(SWITCH_ID_A)) .destSwitch(makeSwitch(SWITCH_ID_D)) .segments(Lists.newArrayList( buildPathSegment(SWITCH_ID_A, SWITCH_ID_D, 10, 10))) .build(); flow2.addPaths(newPath); paths.add(newPath); IntersectionComputer computer = new IntersectionComputer(FLOW_ID, PATH_ID, PATH_ID_REVERSE, paths); OverlappingSegmentsStats stats = computer.getOverlappingStats(NEW_PATH_ID, NEW_PATH_ID_REVERSE); assertEquals(new OverlappingSegmentsStats(0, 1, 0, 33), stats); }
public OverlappingSegmentsStats getOverlappingStats() { return computeIntersectionCounters( otherEdges.values().stream().flatMap(Collection::stream).collect(Collectors.toSet())); }
IntersectionComputer { public OverlappingSegmentsStats getOverlappingStats() { return computeIntersectionCounters( otherEdges.values().stream().flatMap(Collection::stream).collect(Collectors.toSet())); } }
IntersectionComputer { public OverlappingSegmentsStats getOverlappingStats() { return computeIntersectionCounters( otherEdges.values().stream().flatMap(Collection::stream).collect(Collectors.toSet())); } IntersectionComputer(String targetFlowId, PathId targetForwardPathId, PathId targetReversePathId,
                                Collection<FlowPath> paths); }
IntersectionComputer { public OverlappingSegmentsStats getOverlappingStats() { return computeIntersectionCounters( otherEdges.values().stream().flatMap(Collection::stream).collect(Collectors.toSet())); } IntersectionComputer(String targetFlowId, PathId targetForwardPathId, PathId targetReversePathId,
                                Collection<FlowPath> paths); OverlappingSegmentsStats getOverlappingStats(); OverlappingSegmentsStats getOverlappingStats(PathId forwardPathId, PathId reversePathId); static boolean isProtectedPathOverlaps(
            List<PathSegment> primaryFlowSegments, List<PathSegment> protectedFlowSegments); }
IntersectionComputer { public OverlappingSegmentsStats getOverlappingStats() { return computeIntersectionCounters( otherEdges.values().stream().flatMap(Collection::stream).collect(Collectors.toSet())); } IntersectionComputer(String targetFlowId, PathId targetForwardPathId, PathId targetReversePathId,
                                Collection<FlowPath> paths); OverlappingSegmentsStats getOverlappingStats(); OverlappingSegmentsStats getOverlappingStats(PathId forwardPathId, PathId reversePathId); static boolean isProtectedPathOverlaps(
            List<PathSegment> primaryFlowSegments, List<PathSegment> protectedFlowSegments);  }