private int partition(double[] input, int lo, int hi) {
		int i = lo;
		int j = hi+1;
		int anchor = lo;
		while (true) {
			while (Helper.less(input, ++i, anchor)) {
				if (i == hi) break;
			}
			while (Helper.less(input, anchor, --j)) {
				if (j == lo) break;
			}
			if (i >= j) break;
			Helper.exch(input, i, j);
		}
		Helper.exch(input, lo, j);
		return j;
	}