Arrays.sort(set);
if (maxIndex < set[set.length - 1])
maxIndex = set[set.length - 1];
}
++maxIndex;
previousMask = new LongBackedBitArray(maxIndex);
temp = new LongBackedBitArray(maxIndex);
setMasks = new BitArray[sets.length];
for (int i = 0; i < sets.length; ++i) {
setMasks[i] = new LongBackedBitArray(maxIndex);
for (int j : sets[i])
setMasks[i].set(j);
}
combination = new int[sets.length];
previousMask.setAll();