private void findExactNN(Node node, ResultSet resultSet, double[] query) {
		// Pruning. Ignore those clusters that are too far away -----
		double bsq = metric.distance(query, node.pivot);
		double rsq = node.radius;
		double wsq = resultSet.worstDistance();

		double val = bsq - rsq - wsq;
		double val2 = val * val - 4 * rsq * wsq;

		if (val > 0 && val2 > 0) {
			return;
		}
		// ----------------------------------------------------------

		// Terminal node.
		if (node.children.isEmpty()) {
			for (int i = 0; i < node.size; i++) {
				PointInfo pointInfo = node.points.get(i);
				int index = pointInfo.index;
				double dist = metric.distance(pointInfo.point, query);
				resultSet.addPoint(dist, index);
			}
		}
		// Internal node.
		else {
			int[] sortIndices = new int[branching];
			getCenterOrdering(node, query, sortIndices);
			for (int i = 0; i < branching; i++) {
				findExactNN(node.children.get(sortIndices[i]), resultSet, query);
			}
		}
	}