private void computeRootNodeStatistics() {
		// Compute mean per dimension from all objects.
		double[] mean = new double[numberOfDimensions];
		for (int i = 0; i < numberOfDimensions; i++) {
			mean[i] = 0;
			for (int j = 0; j < numberOfObjects; j++) {
				mean[i] += data[j][i];
			}
		}
		double divFactor = 1.0 / numberOfObjects;
		for (int i = 0; i < numberOfDimensions; i++) {
			mean[i] *= divFactor;
		}

		double radius = 0;
		double variance = 0;
		for (int i = 0; i < numberOfObjects; i++) {
			double dist = metric.distance(mean, data[i]);
			variance += dist;
			if (dist > radius) {
				radius = dist;
			}
		}
		variance /= numberOfObjects;

		// Apply new values for the root node.
		root.pivot = mean;
		root.variance = variance;
		root.radius = radius;
	}