private static Float[] extractSubArray(DimConstraint[] specs, Float[] arr, int ix, int len)
	{
		if (arr == null || arr.length < ix + len) {
			Float[] growLastArr = new Float[len];

			// Handle a group where some rows (first one/few and/or last one/few) are docks.
			for (int i = ix + len - 1; i >= 0; i -= 2) {
				int specIx = (i >> 1);
				if (specs[specIx] != DOCK_DIM_CONSTRAINT) {
					growLastArr[i - ix] = ResizeConstraint.WEIGHT_100;
					return growLastArr;
				}
			}
			return growLastArr;
		}

		Float[] newArr = new Float[len];
		for (int i = 0; i < len; i++)
			newArr[i] = arr[ix + i];
		return newArr;
	}