Package org.grouplens.lenskit.vectors

Examples of org.grouplens.lenskit.vectors.SparseVector.values()


    @Test
    public void testScoreSet() {
        ItemScorer pred = new ConstantItemScorer(5);
        SparseVector v = pred.score(42, LongUtils.packedSet(1, 2, 3, 5, 7));
        assertThat(v.keySet(), contains(1L, 2L, 3L, 5L, 7L));
        assertThat(v.values(), everyItem(equalTo(5.0)));
    }

    @Test
    public void testScoreVector() {
        ItemScorer pred = new ConstantItemScorer(5);
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.