321322323324325326327328329330331
Statistics stat = new Statistics(v); while (stat.count() > 0) { int i = (int) (Math.random() * stat.count()); stat.removeValue(i); v.remove(i); Assert.assertEquals(v, stat.getValues()); } assertClean(stat);
329330331332333334335336337338339
} assertClean(stat); v = asList(new double[]{1, 2, 3, 4, 5}); stat.setValues(v); stat.removeValue(-1); stat.removeValue(5); Assert.assertEquals(v, stat.getValues()); } /**
330331332333334335336337338339340
assertClean(stat); v = asList(new double[]{1, 2, 3, 4, 5}); stat.setValues(v); stat.removeValue(-1); stat.removeValue(5); Assert.assertEquals(v, stat.getValues()); } /** * Tests the <code>removeValues(Double, Double)</code> method.