/** * @see LandmarkStorage#setMaximumWeight(double) */ public PrepareLandmarks setMaximumWeight(double maximumWeight) { lms.setMaximumWeight(maximumWeight); return this; }
@Test public void testInfinitWeight() { Directory dir = new RAMDirectory(); EdgeIteratorState edge = ghStorage.edge(0, 1); int res = new LandmarkStorage(ghStorage, dir, new FastestWeighting(encoder) { @Override public double calcWeight(EdgeIteratorState edgeState, boolean reverse, int prevOrNextEdgeId) { return Integer.MAX_VALUE * 2L; } }, 8).setMaximumWeight(LandmarkStorage.PRECISION).calcWeight(edge, false); assertEquals(Integer.MAX_VALUE, res); dir = new RAMDirectory(); res = new LandmarkStorage(ghStorage, dir, new FastestWeighting(encoder) { @Override public double calcWeight(EdgeIteratorState edgeState, boolean reverse, int prevOrNextEdgeId) { return Double.POSITIVE_INFINITY; } }, 8).setMaximumWeight(LandmarkStorage.PRECISION).calcWeight(edge, false); assertEquals(Integer.MAX_VALUE, res); }
setMaximumWeight(LandmarkStorage.PRECISION);
/** * @see LandmarkStorage#setMaximumWeight(double) */ public PrepareLandmarks setMaximumWeight(double maximumWeight) { lms.setMaximumWeight(maximumWeight); return this; }
/** * @see LandmarkStorage#setMaximumWeight(double) */ public PrepareLandmarks setMaximumWeight(double maximumWeight) { lms.setMaximumWeight(maximumWeight); return this; }