private void addSomeOf(FastIDSet possibleItemIDs, FastIDSet itemIDs) {
if (itemIDs.size() > maxItemsPerUser) {
LongPrimitiveIterator it =
new SamplingLongPrimitiveIterator(itemIDs.iterator(), (double) maxItemsPerUser / itemIDs.size());
while (it.hasNext()) {
possibleItemIDs.add(it.nextLong());
}
} else {
possibleItemIDs.addAll(itemIDs);
}
}