private static int sumEqNe(double value,double[] bv,BinaryOperator bOp) throws DMLRuntimeException {
  int ix=Arrays.binarySearch(bv,value);
  int cnt=0;
  if (ix >= 0) {
    while (ix > 0 && value == bv[ix - 1])     --ix;
    while (ix < bv.length && value == bv[ix]) {
      ix++;
      cnt++;
    }
  }
  if (bOp.fn instanceof NotEquals)   cnt=bv.length - cnt;
  return cnt;
}

private static int sumEqNe ( double value , double [ ] bv , BinaryOperator bOp ) throws DMLRuntimeException { int ix = Arrays . binarySearch ( bv , value ) ; int cnt = 0 ; if ( ix >= 0 ) { while ( ix > 0 && value == bv [ ix - 1 ] ) -- ix ; while ( ix < bv . length && value == bv [ ix ] ) { ix ++ ; cnt ++ ; } } if ( bOp . fn instanceof NotEquals ) cnt = bv . length - cnt ; return cnt ; }
calculates the sum of number for equal and notequal operators
