Package org.grouplens.lenskit.indexes

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


    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

Related Classes of org.grouplens.lenskit.indexes.MutableIdIndexMapping

Copyright © 2018 www.massapicom. 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.