Lucene.Net.Util.OpenBitSet.Union C# (CSharp) Method

Union() public method

this = this OR other
public Union ( OpenBitSet other ) : void
other OpenBitSet
return void
		public virtual void  Union(OpenBitSet other)
		{
			int newLen = System.Math.Max(wlen, other.wlen);
			EnsureCapacityWords(newLen);
			
			long[] thisArr = this.internalbits;
			long[] otherArr = other.internalbits;
			int pos = System.Math.Min(wlen, other.wlen);
			while (--pos >= 0)
			{
				thisArr[pos] |= otherArr[pos];
			}
			if (this.wlen < newLen)
			{
				Array.Copy(otherArr, this.wlen, thisArr, this.wlen, newLen - this.wlen);
			}
			this.wlen = newLen;
		}