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

FastGet() public method

Returns true or false for the specified bit index. The index should be less than the OpenBitSet size
public FastGet ( int index ) : bool
index int
return bool
		public virtual bool FastGet(int index)
		{
			int i = index >> 6; // div 64
			// signed shift will keep a negative index and force an
			// array-index-out-of-bounds-exception, removing the need for an explicit check.
			int bit = index & 0x3f; // mod 64
			long bitmask = 1L << bit;
			return (internalbits[i] & bitmask) != 0;
		}
		

Same methods

OpenBitSet::FastGet ( long index ) : bool

Usage Example

 public override sealed int FindValues(OpenBitSet bitset, int docId, int maxId)
 {
     while (docId <= maxId && !bitset.FastGet(array[docId >> SHIFT_SIZE][docId & MASK]))
     {
         docId++;
     }
     return docId;
 }
All Usage Examples Of Lucene.Net.Util.OpenBitSet::FastGet