@Test public void testLimitInBetweenNodesActiveCell() { 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> nodeIds = new HashSet<>(); Set<Integer> expectedNodeIds = new HashSet<>(); expectedNodeIds.add(4); expectedNodeIds.add(5); expectedNodeIds.add(6); expectedNodeIds.add(7); for (IntObjectCursor<SPTEntry> entry : fastIsochroneAlgorithm.getActiveCellMaps().get(3)) { nodeIds.add(entry.value.adjNode); } assertEquals(expectedNodeIds, nodeIds); assertEquals(5.0, fastIsochroneAlgorithm.getActiveCellMaps().get(3).get(4).weight, 1e-10); assertEquals(6.0, fastIsochroneAlgorithm.getActiveCellMaps().get(3).get(5).weight, 1e-10); assertEquals(6.0, fastIsochroneAlgorithm.getActiveCellMaps().get(3).get(6).weight, 1e-10); assertEquals(5.0, fastIsochroneAlgorithm.getActiveCellMaps().get(3).get(7).weight, 1e-10); }
public Map<Integer, IntObjectMap<SPTEntry>> getActiveCellMaps() { return activeCellMaps; }
FastIsochroneAlgorithm extends AbstractIsochroneAlgorithm { public Map<Integer, IntObjectMap<SPTEntry>> getActiveCellMaps() { return activeCellMaps; } }
FastIsochroneAlgorithm extends AbstractIsochroneAlgorithm { public Map<Integer, IntObjectMap<SPTEntry>> getActiveCellMaps() { return activeCellMaps; } FastIsochroneAlgorithm(Graph graph,
                                  Weighting weighting,
                                  TraversalMode tMode,
                                  CellStorage cellStorage,
                                  IsochroneNodeStorage isochroneNodeStorage,
                                  EccentricityStorage eccentricityStorage,
                                  BorderNodeDistanceStorage borderNodeDistanceStorage,
                                  EdgeFilter additionalEdgeFilter); }
FastIsochroneAlgorithm extends AbstractIsochroneAlgorithm { public Map<Integer, IntObjectMap<SPTEntry>> getActiveCellMaps() { return activeCellMaps; } 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 Map<Integer, IntObjectMap<SPTEntry>> getActiveCellMaps() { return activeCellMaps; } 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();  }