Exemple #1
0
 @Test
 public void testVarianceScalar() {
   assertThat(
       Stats.variance(set, mean), equalTo(1.2)); // more accurate than Stats.varianceVector()
 }
Exemple #2
0
 @Test(expected = IllegalArgumentException.class)
 public void testEmptySetForVarianceScalar() {
   Stats.variance(new ArrayList<Pattern>(), mean);
 }