Examples of unowned()


Examples of org.grouplens.lenskit.collections.LongKeyDomain.unowned()

     */
    @SuppressWarnings({ "rawtypes", "unchecked" })
    public MutableSparseVector withDomain(LongSet keyDomain) {
        LongKeyDomain domain = LongKeyDomain.fromCollection(keyDomain, false);
        // pass an unowned domain to avoid the extra copy
        return withDomain(domain.unowned());
    }

    /**
     * Create a version of this vector with a different domain.
     * @param domain The domain (active key mask is ignored and reset).
View Full Code Here

Examples of org.grouplens.lenskit.collections.LongKeyDomain.unowned()

            Long2ObjectMap<LongSortedSet> itemUserSets = new Long2ObjectOpenHashMap<LongSortedSet>();
            for (Long2ObjectMap.Entry<LongList> entry: itemUserLists.long2ObjectEntrySet()) {
                itemUserSets.put(entry.getLongKey(), LongUtils.packedSet(entry.getValue()));
            }
            return new UserSnapshot(domain.unowned(), vecs.build(), nvecs.build(), itemUserSets);
        }
    }
}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.