Package org.grouplens.lenskit.vectors

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


    public void testScoreVector() {
        ItemScorer pred = new ConstantItemScorer(5);
        MutableSparseVector v = MutableSparseVector.create(1, 2, 3, 5, 7);
        pred.score(42, v);
        assertThat(v.keySet(), contains(1L, 2L, 3L, 5L, 7L));
        assertThat(v.values(), everyItem(equalTo(5.0)));
    }
}
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.