Пример #1
0
 // @Test
 public void ErrorCorrect() {
   int size = 100;
   double eps = 1.0 / size;
   double delta = .01;
   CountMin countmin = new CountMin(eps, delta);
   for (long key = 0L; key < 10000L; key++) {
     countmin.update(key, 1);
     Assert.assertTrue(countmin.getMaxError() == (long) (Math.ceil((key + 1) * eps)));
   }
 }