private void assertArrayEquals(double[] expected,double[] actual,double delta,boolean checkNaN){
  Assert.assertEquals(expected.length,actual.length);
  for (int index=0; index < actual.length; index++) {
    double d1=expected[index];
    double d2=actual[index];
    if (Double.isNaN(d1) || Double.isNaN(d2)) {
      if (checkNaN) {
        Assert.assertTrue(Double.isNaN(d1) == Double.isNaN(d2));
      }
      Assert.assertTrue(true);
    }
 else {
      Assert.assertEquals(d1,d2,delta);
    }
  }
}

private void assertArrayEquals ( double [ ] expected , double [ ] actual , double delta , boolean checkNaN ) { Assert . assertEquals ( expected . length , actual . length ) ; for ( int index = 0 ; index < actual . length ; index ++ ) { double d1 = expected [ index ] ; double d2 = actual [ index ] ; if ( Double . isNaN ( d1 ) || Double . isNaN ( d2 ) ) { if ( checkNaN ) { Assert . assertTrue ( Double . isNaN ( d1 ) == Double . isNaN ( d2 ) ) ; } Assert . assertTrue ( true ) ; } else { Assert . assertEquals ( d1 , d2 , delta ) ; } } }
this is an assertion for a special case when a loss full algorithm is used and a quantification with null checks . the will result in wrong null values , because some of the values representing blank will be lost .
