@Test public void testStartCell() { 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(0); expectedNodeIds.add(1); expectedNodeIds.add(2); expectedNodeIds.add(3); expectedNodeIds.add(8); for (IntObjectCursor<SPTEntry> entry : fastIsochroneAlgorithm.getStartCellMap()) { nodeIds.add(entry.value.adjNode); } assertEquals(expectedNodeIds, nodeIds); assertEquals(1.0, fastIsochroneAlgorithm.getStartCellMap().get(0).weight, 1e-10); assertEquals(0.0, fastIsochroneAlgorithm.getStartCellMap().get(1).weight, 1e-10); assertEquals(1.0, fastIsochroneAlgorithm.getStartCellMap().get(2).weight, 1e-10); assertEquals(3.0, fastIsochroneAlgorithm.getStartCellMap().get(3).weight, 1e-10); assertEquals(2.0, fastIsochroneAlgorithm.getStartCellMap().get(8).weight, 1e-10); }
public IntObjectMap<SPTEntry> getStartCellMap() { return startCellMap; }
FastIsochroneAlgorithm extends AbstractIsochroneAlgorithm { public IntObjectMap<SPTEntry> getStartCellMap() { return startCellMap; } }
FastIsochroneAlgorithm extends AbstractIsochroneAlgorithm { public IntObjectMap<SPTEntry> getStartCellMap() { return startCellMap; } FastIsochroneAlgorithm(Graph graph,
                                  Weighting weighting,
                                  TraversalMode tMode,
                                  CellStorage cellStorage,
                                  IsochroneNodeStorage isochroneNodeStorage,
                                  EccentricityStorage eccentricityStorage,
                                  BorderNodeDistanceStorage borderNodeDistanceStorage,
                                  EdgeFilter additionalEdgeFilter); }
FastIsochroneAlgorithm extends AbstractIsochroneAlgorithm { public IntObjectMap<SPTEntry> getStartCellMap() { return startCellMap; } 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 IntObjectMap<SPTEntry> getStartCellMap() { return startCellMap; } 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();  }