Examples of internId()


Examples of org.grouplens.lenskit.indexes.MutableIdIndexMapping.internId()

    }

    @Test
    public void testFromBiggerArray() {
        MutableIdIndexMapping map = new MutableIdIndexMapping();
        map.internId(42);
        map.internId(39);
        MutableSparseVector msv =
                Vectors.fromArray(map, new double[]{Math.PI, Math.E});
        assertThat(msv.size(), equalTo(2));
        assertThat(msv.get(42), equalTo(Math.PI));
View Full Code Here

Examples of org.grouplens.lenskit.indexes.MutableIdIndexMapping.internId()

    @Test
    public void testFromBiggerArray() {
        MutableIdIndexMapping map = new MutableIdIndexMapping();
        map.internId(42);
        map.internId(39);
        MutableSparseVector msv =
                Vectors.fromArray(map, new double[]{Math.PI, Math.E});
        assertThat(msv.size(), equalTo(2));
        assertThat(msv.get(42), equalTo(Math.PI));
        assertThat(msv.get(39), equalTo(Math.E));
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.