public int selectDivision(double[] v) {
		int num = 0;
		int[] topind = new int[RAND_DIM];

		for (int i = 0; i < numberOfDimensions; i++) {
			if (num < RAND_DIM || v[i] > v[topind[num - 1]]) {
				if (num < RAND_DIM) {
					topind[num++] = i;
				} else {
					topind[num - 1] = i;
				}

				// Bubble the right-most value to left.
				int j = num - 1;
				while (j > 0 && v[topind[j]] > v[topind[j - 1]]) {
					// Swap.
					int temp = topind[j];
					topind[j] = topind[j - 1];
					topind[j - 1] = temp;
					j--;
				}
			}
		}

		int rnd = Utils.genRandomNumberInRange(0, num - 1);
		return topind[rnd];
	}