/// <summary>
/// Computes the in-place bitwise AND of this container with another
/// (intersection). The current container is generally modified, whereas
/// the provided container (x) is unaffected. May generate a new container.
/// </summary>
/// <param name="x">Other container</param>
/// <returns>Aggregated container</returns>
public override Container IAnd(BitsetContainer other)
{
int pos = 0;
for (int k = 0; k < Cardinality; k++)
{
ushort v = Content[k];
if (other.Contains(v))
{
Content[pos++] = v;
}
}
Cardinality = pos;
return(this);
}