Exclusive-or (XOR): Flip the bit in this {@code BitMatrix} if the corresponding
mask bit is set.

@param mask XOR mask
439674
public void xor(BitMatrix mask) {
    if (width != mask.getWidth() || height != mask.getHeight()
        || rowSize != mask.getRowSize()) {
      throw new IllegalArgumentException("input matrix dimensions do not match");
    }
    BitArray rowArray = new BitArray(width);
    for (int y = 0; y < height; y++) {
      int offset = y * rowSize;
      int[] row = mask.getRow(y, rowArray).getBitArray();
      for (int x = 0; x < rowSize; x++) {
        bits[offset + x] ^= row[x];
      }
    }
  }
363420
@Override
	public void flipBit(int index) {
		index = adjIndex(index);
		checkMutability();
		bits[index] = !bits[index];
	}
56809
protected void xor(byte[] dest, byte[] src)
    {
        for (int i = 0; i < dest.length; i++)
        {
            dest[i] ^= src[i];
        }
    }
604594
public void setMask(byte[] mask) {
    if (mask == null) {
      throw new IllegalArgumentException("Transmitter mask cannot be null.");
    }
    if (mask.length != TRANSMITTER_ID_SIZE) {
      throw new IllegalArgumentException(String.format(
          "Transmitter mask must be %d bytes long.",
          Integer.valueOf(TRANSMITTER_ID_SIZE)));
    }
    this.mask = mask;
  }
816079
public final void xor(ThreadSafeBitSet other) {
        if (other.size != size) throw new IllegalArgumentException("BitSets must be of equal size");
        for (int i = 0; i < bits.length; i++) {
            bits[i] ^= other.bits[i];
        }
    }
996018
private void calculate(String mask) {
        Matcher matcher = cidrPattern.matcher(mask);

        if (matcher.matches()) {
            matchAddress(matcher);

            /* Create a binary netmask from the number of bits specification /x */
            rangeCheck(Integer.parseInt(matcher.group(5)), 0, NBITS);
        } else {
            throw new IllegalArgumentException("Could not parse [" + mask + "]");
        }
    }
1029337
void xor(LongBitSet other) {
		assert other.numWords <= numWords : "numWords=" + numWords + ", other.numWords=" + other.numWords;
		int pos = Math.min(numWords, other.numWords);
		while (--pos >= 0) {
			bits[pos] ^= other.bits[pos];
		}
	}
600381
public static String unmask(final String mask, final String value) throws ParseException
    {
        return maskFormat(mask).parse(value);
    }
228208
public static long xorCount(OpenBitSet a, OpenBitSet b) {
        long tot = BitUtil.pop_xor( a.bits, b.bits, 0, Math.min( a.wlen, b.wlen ) );
        if (a.wlen < b.wlen) {
            tot += BitUtil.pop_array( b.bits, a.wlen, b.wlen - a.wlen );
        } else if (a.wlen > b.wlen) {
            tot += BitUtil.pop_array( a.bits, b.wlen, a.wlen - b.wlen );
        }
        return tot;
    }
247696
def bit_mask(name,flags,type=:uint)
      bit_mask = BitMask.new(flags,type)

      typedef(bit_mask,name)
      return bit_mask
    end
1061985
void flip(long index) {
		assert index >= 0 && index < numBits : "index=" + index + " numBits=" + numBits;
		int wordNum = (int) (index >> 6); // div 64
		long bitmask = 1L << index; // mod 64 is implicit
		bits[wordNum] ^= bitmask;
	}
1152587
public Bits xorSet(Bits xs) {
        Assert.check(currentState != BitsState.UNKNOWN);
        sizeTo(xs.bits.length);
        for (int i = 0; i < xs.bits.length; i++) {
            bits[i] = bits[i] ^ xs.bits[i];
        }
        currentState = BitsState.NORMAL;
        return this;
    }
1082730
private void leaf2( int mask ) throws T {
    assert (mask==0 || ( (mask&16)==16 && (mask&32)==32) ) : "Unknown mask: " + mask;   // Is a leaf or a special leaf on the top of tree
    leaf(_ts.get4f());
  }
521043
public static void bitSet(MemorySegment[] segments, int baseOffset, int index) {
		if (segments.length == 1) {
			int offset = baseOffset + ((index & BIT_BYTE_POSITION_MASK) >>> 3);
			MemorySegment segment = segments[0];
			byte current = segment.get(offset);
			current |= (1 << (index & BIT_BYTE_INDEX_MASK));
			segment.put(offset, current);
		} else {
			bitSetMultiSegments(segments, baseOffset, index);
		}
	}
1302915
@Override
	public void flipBit(int index) {
		index = adjIndex(index);
		checkMutable();
		final int i = index >> ADDRESS_BITS;
		final long m = 1L << (index & ADDRESS_MASK);
		bits[i] ^=  m;
	}
39006
public void setImageMask(Image mask) throws DocumentException {
		if (this.mask)
			throw new DocumentException(
					"An image mask cannot contain another image mask.");
		if (!mask.mask)
			throw new DocumentException(
					"The image mask is not a mask. Did you do makeMask()?");
		imageMask = mask;
		smask = (mask.bpc > 1 && mask.bpc <= 8);
	}
1251591
private static byte[] xor(byte[] bytes) {
        byte[] xor_bytes = null;

        if (bytes != null) {
            xor_bytes = new byte[bytes.length];

            for (int i = 0; i < bytes.length; i++) {
                xor_bytes[i] = (byte) (XOR_MASK ^ bytes[i]);
            }
        }

        return xor_bytes;
    }