LongPrimitiveIterator users = recommender.getDataModel().getUserIDs();
while (users.hasNext()) {
long userID = users.nextLong();
List<RecommendedItem> recs1 = recommender.recommend(userID, model.getNumItems());
PreferenceArray prefs2 = model.getPreferencesFromUser(userID);
prefs2.sortByValueReversed();
FastIDSet commonSet = new FastIDSet();
long maxItemID = setBits(commonSet, recs1, samples);
FastIDSet otherSet = new FastIDSet();
maxItemID = Math.max(maxItemID, setBits(otherSet, prefs2, samples));
int max = mask(commonSet, otherSet, maxItemID);