private void searchLevelExact(ResultSet resultSet, double[] query,
			Node node, double mindist, float epsError) {
		// If this is a leaf node.
		if (node.child1 == null && node.child2 == null) {
			int index = node.cutDimension;
			double dist = metric.distance(node.point, query);
			resultSet.addPoint(dist, index);
			return;
		}

		// Which child branch should be taken first?
		double val = query[node.cutDimension];
		double diff = val - node.cutDimensionValue;
		Node bestChild = diff < 0 ? node.child1 : node.child2;
		Node otherChild = diff < 0 ? node.child2 : node.child1;

		double newDistSq = mindist
				+ metric.distance(val, node.cutDimensionValue);

		// Call recursively to search next level down.
		searchLevelExact(resultSet, query, bestChild, mindist, epsError);

		if (mindist * epsError <= resultSet.worstDistance()) {
			searchLevelExact(resultSet, query, otherChild, newDistSq, epsError);
		}
	}