Examples of MutableIdIndexMapping


Examples of org.grouplens.lenskit.indexes.MutableIdIndexMapping

        assertThat(msv.get(10), equalTo(Math.PI));
    }

    @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

Examples of org.grouplens.lenskit.indexes.MutableIdIndexMapping

    private MutableIdIndexMapping userIndex;
   
    private IntHeapPriorityQueue freeList;

    public PackedPreferenceDataBuilder() {
        itemIndex = new MutableIdIndexMapping();
        userIndex = new MutableIdIndexMapping();
        freeList = new IntHeapPriorityQueue();
        allocate(INITIAL_CHUNK_COUNT);
    }
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.