public IBitset Difference(IBitset otherSet)
{
UncompressedBitArray workset = null;
if (otherSet is UncompressedBitArray)
{
workset = (UncompressedBitArray)otherSet;
}
else
{
throw new InvalidOperationException("otherSet is not an UncompressedBitArray");
}
UncompressedBitArray newArray = (UncompressedBitArray) this.Clone();
for (int i = 0; i < workset.array.Length; i++)
{
if (workset.array[i] && i < this.Length)
{
newArray.Set(i, false);
}
}
return newArray;
}