@Test
public void testRMin() {
Graph graph = createTestGraph(encodingManager);
LocationIndexTree index = createIndex(graph, 50000);
DistanceCalc distCalc = new DistancePlaneProjection();
double rmin = index.calculateRMin(0.05, -0.3);
double check = distCalc.calcDist(0.05, Math.abs(graph.getNodeAccess().getLon(2)) - index.getDeltaLon(), -0.3, -0.3);
assertTrue((rmin - check) < 0.0001);
double rmin2 = index.calculateRMin(0.05, -0.3, 1);
double check2 = distCalc.calcDist(0.05, Math.abs(graph.getNodeAccess().getLat(0)), -0.3, -0.3);
assertTrue((rmin2 - check2) < 0.0001);
GHIntHashSet points = new GHIntHashSet();
assertEquals(Double.MAX_VALUE, index.calcMinDistance(0.05, -0.3, points), 1e-1);
points.add(0);
points.add(1);
assertEquals(54757.03, index.calcMinDistance(0.05, -0.3, points), 1e-1);
}