@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; TripPatternKey that = (TripPatternKey) o; if (dropoffTypes != null ? !dropoffTypes.equals(that.dropoffTypes) : that.dropoffTypes != null) return false; if (pickupTypes != null ? !pickupTypes.equals(that.pickupTypes) : that.pickupTypes != null) return false; if (routeId != null ? !routeId.equals(that.routeId) : that.routeId != null) return false; if (stops != null ? !stops.equals(that.stops) : that.stops != null) return false; return true; }
@Test public void testRekeyBugOfIntBinHeap() { // using Dijkstra + IntBinHeap then rekey loops endlessly GraphHopperStorage matrixGraph = createMatrixGraph(); Path p = createAlgo(matrixGraph).calcPath(36, 91); assertEquals(12, p.calcNodes().size()); IntIndexedContainer list = p.calcNodes(); if (!IntArrayList.from(new int[]{36, 46, 56, 66, 76, 86, 85, 84, 94, 93, 92, 91}).equals(list) && !IntArrayList.from(new int[]{36, 46, 56, 66, 76, 86, 85, 84, 83, 82, 92, 91}).equals(list)) { assertTrue("wrong locations: " + list.toString(), false); } assertEquals(66f, p.getDistance(), 1e-3); testBug1(matrixGraph); testCorrectWeight(matrixGraph); }