public Or ( |
||
x | Other container | |
Résultat | Container |
public override Container Or(ArrayContainer x)
{
BitsetContainer answer = (BitsetContainer) Clone();
int c = x.Cardinality;
for (int k = 0; k < c ; ++k)
{
ushort v = x.Content[k];
int i = v >> 6;
long w = answer.Bitmap[i];
long aft = w | (1L << v);
answer.Bitmap[i] = aft;
answer.Cardinality += (int)((w - aft) >> 63);
}
return answer;
}
BitsetContainer::Or ( |
/// <summary> /// Computes the bitwise OR of this container with another (union). This /// container as well as the provided container are left unaffected. /// </summary> /// <param name="x">Other container</param> /// <returns>Aggregated container</returns> public override Container Or(BitsetContainer x) { return x.Or((ArrayContainer) this); }