public static NominalProject setUpNominalProject() {
   IncrementalMV imv = new IncrementalMV();
   MemoryJobStorage js = new MemoryJobStorage();
   Collection<String> categories = Arrays.asList(new String[] {"A", "B", "C"});
   NominalProject project =
       new NominalProject(
           imv, js.getNominalData("testId"), js.getNominalResults("testId", categories));
   project.initializeCategories(categories, null, null);
   project.getData().addNewUpdatableAlgorithm(imv);
   return project;
 }
예제 #2
0
 @Test
 public void testBatchMV() {
   BatchMV mv = new BatchMV();
   NominalProject np = new NominalProject(mv);
   np.initializeCategories(categories, null, null);
   NominalData nd = np.getData();
   Results<String, DatumResult, WorkerResult> results = np.getResults();
   mv.setData(nd);
   mv.setResults(results);
   fillNominalData(nd);
   mv.compute();
   testMVResults(results);
 }
예제 #3
0
 @Test
 public void testIncrementalMV() {
   IncrementalMV mv = new IncrementalMV();
   NominalProject np = new NominalProject(mv);
   np.initializeCategories(categories, null, null);
   NominalData nd = np.getData();
   Results<String, DatumResult, WorkerResult> results = np.getResults();
   mv.setData(nd);
   mv.setResults(results);
   nd.addNewUpdatableAlgorithm(mv);
   fillNominalData(nd);
   testMVResults(results);
 }