ImmutableList.Builder<ImmutableSparseVector> nvecs = ImmutableList.builder();
for (LongIterator uiter = domain.activeSetView().iterator(); uiter.hasNext();) {
final long user = uiter.nextLong();
MutableSparseVector vec = vectors.get(user);
// save user's original vector
ImmutableSparseVector userVector = vec.immutable();
vecs.add(userVector);
// normalize user vector
normalizer.normalize(user, userVector, vec);
// and save normalized vector
nvecs.add(vec.immutable());
for (LongIterator iiter = userVector.keySet().iterator(); iiter.hasNext();) {
final long item = iiter.nextLong();
LongList itemUsers = itemUserLists.get(item);
if (itemUsers == null) {
itemUsers = new LongArrayList();
itemUserLists.put(item, itemUsers);