Package org.apache.mahout.cf.taste.model

Examples of org.apache.mahout.cf.taste.model.UpdatableIDMigrator


    assertEquals(DUMMY_ID, id);
  }

  @Test
  public void testStore() throws Exception {
    UpdatableIDMigrator migrator = new MemoryIDMigrator();
    long id = migrator.toLongID(DUMMY_STRING);
    assertNull(migrator.toStringID(id));
    migrator.storeMapping(id, DUMMY_STRING);
    assertEquals(DUMMY_STRING, migrator.toStringID(id));
  }
View Full Code Here


    assertEquals(DUMMY_STRING, migrator.toStringID(id));
  }

  @Test
  public void testInitialize() throws Exception {
    UpdatableIDMigrator migrator = new MemoryIDMigrator();
    long id = migrator.toLongID(DUMMY_STRING);
    assertNull(migrator.toStringID(id));
    migrator.initialize(Collections.singleton(DUMMY_STRING));
    assertEquals(DUMMY_STRING, migrator.toStringID(id));
  }
View Full Code Here

TOP

Related Classes of org.apache.mahout.cf.taste.model.UpdatableIDMigrator

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.