public static int xorCardinality(final RoaringBitmap x1, final RoaringBitmap x2) {
    return x1.getCardinality() + x2.getCardinality() - 2 * andCardinality(x1, x2);
  }
public static int xorCardinality ( final RoaringBitmap x1 , final RoaringBitmap x2 ) { return x1 . getCardinality ( ) + x2 . getCardinality ( ) - 2 * andCardinality ( x1 , x2 ) ; }
Cardinality of the bitwise XOR (symmetric difference) operation.
The provided bitmaps are *not* modified. This operation is thread-safe
as long as the provided bitmaps remain unchanged.

@param x1 first bitmap
@param x2 other bitmap
@return cardinality of the symmetric difference