@Test public void testFullyReachableCells() { GraphHopperStorage graphHopperStorage = ToyGraphCreationUtil.createMediumGraphWithAdditionalEdge(encodingManager); Weighting shortestWeighting = new ShortestWeighting(carEncoder); createMockStorages(graphHopperStorage); Eccentricity ecc = new Eccentricity(graphHopperStorage, null, ins, cs); ecc.loadExisting(shortestWeighting); ecc.calcEccentricities(shortestWeighting, carEncoder); ecc.calcBorderNodeDistances(shortestWeighting, carEncoder); FastIsochroneAlgorithm fastIsochroneAlgorithm = new FastIsochroneAlgorithm( graphHopperStorage.getBaseGraph(), shortestWeighting, TraversalMode.NODE_BASED, cs, ins, ecc.getEccentricityStorage(shortestWeighting), ecc.getBorderNodeDistanceStorage(shortestWeighting), null); fastIsochroneAlgorithm.calcIsochroneNodes(1, 5.5); Set<Integer> cellIds = fastIsochroneAlgorithm.getFullyReachableCells(); Set<Integer> expectedCellIds = new HashSet<>(); assertEquals(expectedCellIds, cellIds); fastIsochroneAlgorithm = new FastIsochroneAlgorithm( graphHopperStorage.getBaseGraph(), shortestWeighting, TraversalMode.NODE_BASED, cs, ins, ecc.getEccentricityStorage(shortestWeighting), ecc.getBorderNodeDistanceStorage(shortestWeighting), null); fastIsochroneAlgorithm.calcIsochroneNodes(1, 6); cellIds = fastIsochroneAlgorithm.getFullyReachableCells(); expectedCellIds = new HashSet<>(); expectedCellIds.add(2); assertEquals(expectedCellIds, cellIds); fastIsochroneAlgorithm = new FastIsochroneAlgorithm( graphHopperStorage.getBaseGraph(), shortestWeighting, TraversalMode.NODE_BASED, cs, ins, ecc.getEccentricityStorage(shortestWeighting), ecc.getBorderNodeDistanceStorage(shortestWeighting), null); fastIsochroneAlgorithm.calcIsochroneNodes(8, 6); cellIds = fastIsochroneAlgorithm.getFullyReachableCells(); expectedCellIds = new HashSet<>(); expectedCellIds.add(2); expectedCellIds.add(3); assertEquals(expectedCellIds, cellIds); }
public Set<Integer> getFullyReachableCells() { return fullyReachableCells; }
FastIsochroneAlgorithm extends AbstractIsochroneAlgorithm { public Set<Integer> getFullyReachableCells() { return fullyReachableCells; } }
FastIsochroneAlgorithm extends AbstractIsochroneAlgorithm { public Set<Integer> getFullyReachableCells() { return fullyReachableCells; } FastIsochroneAlgorithm(Graph graph,
                                  Weighting weighting,
                                  TraversalMode tMode,
                                  CellStorage cellStorage,
                                  IsochroneNodeStorage isochroneNodeStorage,
                                  EccentricityStorage eccentricityStorage,
                                  BorderNodeDistanceStorage borderNodeDistanceStorage,
                                  EdgeFilter additionalEdgeFilter); }
FastIsochroneAlgorithm extends AbstractIsochroneAlgorithm { public Set<Integer> getFullyReachableCells() { return fullyReachableCells; } FastIsochroneAlgorithm(Graph graph,
                                  Weighting weighting,
                                  TraversalMode tMode,
                                  CellStorage cellStorage,
                                  IsochroneNodeStorage isochroneNodeStorage,
                                  EccentricityStorage eccentricityStorage,
                                  BorderNodeDistanceStorage borderNodeDistanceStorage,
                                  EdgeFilter additionalEdgeFilter); @Override void init(int from, double isochroneLimit); @Override boolean finishedStartCellPhase(); @Override boolean finishedBorderNodePhase(); @Override boolean finishedActiveCellPhase(); Set<Integer> getFullyReachableCells(); IntObjectMap<SPTEntry> getStartCellMap(); String getName(); Map<Integer, IntObjectMap<SPTEntry>> getActiveCellMaps(); }
FastIsochroneAlgorithm extends AbstractIsochroneAlgorithm { public Set<Integer> getFullyReachableCells() { return fullyReachableCells; } FastIsochroneAlgorithm(Graph graph,
                                  Weighting weighting,
                                  TraversalMode tMode,
                                  CellStorage cellStorage,
                                  IsochroneNodeStorage isochroneNodeStorage,
                                  EccentricityStorage eccentricityStorage,
                                  BorderNodeDistanceStorage borderNodeDistanceStorage,
                                  EdgeFilter additionalEdgeFilter); @Override void init(int from, double isochroneLimit); @Override boolean finishedStartCellPhase(); @Override boolean finishedBorderNodePhase(); @Override boolean finishedActiveCellPhase(); Set<Integer> getFullyReachableCells(); IntObjectMap<SPTEntry> getStartCellMap(); String getName(); Map<Integer, IntObjectMap<SPTEntry>> getActiveCellMaps();  }