for (Rating r: ratings) {
ids.add(dimension.getId(r));
}
LongKeyDomain keys = LongKeyDomain.fromCollection(ids, false);
MutableSparseVector msv = MutableSparseVector.create(keys.domain());
long[] timestamps = null;
// check for fast-path, where each item has one rating
if (keys.domainSize() < ratings.size()) {
timestamps = new long[keys.domainSize()];
}