protected static void assertStatisticalSummaryEquals(StatisticalSummary expected,StatisticalSummary observed,double delta){
  UnitTestUtils.assertEquals(expected.getMax(),observed.getMax(),0);
  UnitTestUtils.assertEquals(expected.getMin(),observed.getMin(),0);
  Assert.assertEquals(expected.getN(),observed.getN());
  UnitTestUtils.assertEquals(expected.getSum(),observed.getSum(),delta);
  UnitTestUtils.assertEquals(expected.getMean(),observed.getMean(),delta);
  UnitTestUtils.assertEquals(expected.getStandardDeviation(),observed.getStandardDeviation(),delta);
  UnitTestUtils.assertEquals(expected.getVariance(),observed.getVariance(),delta);
}

protected static void assertStatisticalSummaryEquals ( StatisticalSummary expected , StatisticalSummary observed , double delta ) { UnitTestUtils . assertEquals ( expected . getMax ( ) , observed . getMax ( ) , 0 ) ; UnitTestUtils . assertEquals ( expected . getMin ( ) , observed . getMin ( ) , 0 ) ; Assert . assertEquals ( expected . getN ( ) , observed . getN ( ) ) ; UnitTestUtils . assertEquals ( expected . getSum ( ) , observed . getSum ( ) , delta ) ; UnitTestUtils . assertEquals ( expected . getMean ( ) , observed . getMean ( ) , delta ) ; UnitTestUtils . assertEquals ( expected . getStandardDeviation ( ) , observed . getStandardDeviation ( ) , delta ) ; UnitTestUtils . assertEquals ( expected . getVariance ( ) , observed . getVariance ( ) , delta ) ; }
verifies that a statisticalsummary and a statisticalsummaryvalues are equal up to delta , with nans , infinities returned in the same spots . for max , min , n , values have to agree exactly , delta is used only for sum , mean , variance , std dev .
