@Test public void testGetMin() { long key = 611; int n = 1<<10; int size = 1<<5; SpaceSaving ss = new SpaceSaving(n, size, 10); assertTrue(ss.getMin() == 0); assertFalse(ss.inc(key)); assertTrue(ss.getMin() == 1); }
public int getMin() { if (argmin == size) { return 0; } else { return (int) quantities.get(argmin); } }
SpaceSaving { public int getMin() { if (argmin == size) { return 0; } else { return (int) quantities.get(argmin); } } }
SpaceSaving { public int getMin() { if (argmin == size) { return 0; } else { return (int) quantities.get(argmin); } } SpaceSaving(int n, int size, int keySize);   SpaceSaving(int n, int size); }
SpaceSaving { public int getMin() { if (argmin == size) { return 0; } else { return (int) quantities.get(argmin); } } SpaceSaving(int n, int size, int keySize);   SpaceSaving(int n, int size); boolean containsKey(long e); int bound(long e); int getMin(); int error(long e); boolean inc(long key); String toString(); }
SpaceSaving { public int getMin() { if (argmin == size) { return 0; } else { return (int) quantities.get(argmin); } } SpaceSaving(int n, int size, int keySize);   SpaceSaving(int n, int size); boolean containsKey(long e); int bound(long e); int getMin(); int error(long e); boolean inc(long key); String toString();  }