public static long scalarProduct(final long[] bits,final long[] values){
  long sum=0;
  for (int i=bits.length; i-- != 0; ) {
    final int offset=i * 64;
    long word=bits[i];
    while (word != 0) {
      final int lsb=Long.numberOfTrailingZeros(word);
      sum^=values[offset + lsb];
      word&=word - 1;
    }
  }
  return sum;
}

public static long scalarProduct ( final long [ ] bits , final long [ ] values ) { long sum = 0 ; for ( int i = bits . length ; i -- != 0 ; ) { final int offset = i * 64 ; long word = bits [ i ] ; while ( word != 0 ) { final int lsb = Long . numberOfTrailingZeros ( word ) ; sum ^= values [ offset + lsb ] ; word &= word - 1 ; } } return sum ; }
returns the modulo - 2 scalar product of the two provided bit vectors .
