private ISearchBits Apply(ISearchBits other, Action<OpenBitSet, OpenBitSet> operation) { var bitset = (OpenBitSet)_openBitSet.Clone(); var otherBitSet = other as SearchBits; if (otherBitSet == null) { throw new InvalidOperationException("The other bitset must be of type OpenBitSet"); } operation(bitset, otherBitSet._openBitSet); return new SearchBits(bitset); }
private ISearchBits Apply(ISearchBits other, Action <OpenBitSet, OpenBitSet> operation) { var bitset = (OpenBitSet)_openBitSet.Clone(); var otherBitSet = other as SearchBits; if (otherBitSet == null) { throw new InvalidOperationException("The other bitset must be of type OpenBitSet"); } operation(bitset, otherBitSet._openBitSet); return(new SearchBits(bitset)); }
public ISearchBits Xor(ISearchBits other) { return(Apply(other, (x, y) => x.Xor(y))); }
public ISearchBits And(ISearchBits other) { return(Apply(other, (x, y) => x.And(y))); }
public ISearchBits Xor(ISearchBits other) { return Apply(other, (x, y) => x.Xor(y)); }
public ISearchBits And(ISearchBits other) { return Apply(other, (x, y) => x.And(y)); }