@Test public void TestDetectAnyBorder() { VirtualEdgeIteratorState ve1 = generateEdge(1); VirtualEdgeIteratorState ve2 = generateEdge(2); VirtualEdgeIteratorState ve3 = generateEdge(3); BordersExtractor be = new BordersExtractor(_graphstorage, new int[0]); assertEquals(true, be.isBorder(1)); assertEquals(true, be.isBorder(2)); assertEquals(false, be.isBorder(3)); }
public boolean isBorder(int edgeId) { int type = storage.getEdgeValue(edgeId, BordersGraphStorage.Property.TYPE); return (type == BordersGraphStorage.OPEN_BORDER || type == BordersGraphStorage.CONTROLLED_BORDER); }
BordersExtractor { public boolean isBorder(int edgeId) { int type = storage.getEdgeValue(edgeId, BordersGraphStorage.Property.TYPE); return (type == BordersGraphStorage.OPEN_BORDER || type == BordersGraphStorage.CONTROLLED_BORDER); } }
BordersExtractor { public boolean isBorder(int edgeId) { int type = storage.getEdgeValue(edgeId, BordersGraphStorage.Property.TYPE); return (type == BordersGraphStorage.OPEN_BORDER || type == BordersGraphStorage.CONTROLLED_BORDER); } BordersExtractor(BordersGraphStorage storage, int[] avoidCountries); }
BordersExtractor { public boolean isBorder(int edgeId) { int type = storage.getEdgeValue(edgeId, BordersGraphStorage.Property.TYPE); return (type == BordersGraphStorage.OPEN_BORDER || type == BordersGraphStorage.CONTROLLED_BORDER); } BordersExtractor(BordersGraphStorage storage, int[] avoidCountries); int getValue(int edgeId); boolean isBorder(int edgeId); boolean isControlledBorder(int edgeId); boolean isOpenBorder(int edgeId); boolean restrictedCountry(int edgeId); boolean isSameCountry(List<Integer> edgeIds); }
BordersExtractor { public boolean isBorder(int edgeId) { int type = storage.getEdgeValue(edgeId, BordersGraphStorage.Property.TYPE); return (type == BordersGraphStorage.OPEN_BORDER || type == BordersGraphStorage.CONTROLLED_BORDER); } BordersExtractor(BordersGraphStorage storage, int[] avoidCountries); int getValue(int edgeId); boolean isBorder(int edgeId); boolean isControlledBorder(int edgeId); boolean isOpenBorder(int edgeId); boolean restrictedCountry(int edgeId); boolean isSameCountry(List<Integer> edgeIds);  }