Ejemplo n.º 1
0
 // 64 bit shifts
 private void Shift()
 {
     if ((int)word == 0)
     {
         wordShift += 32;
         word       = word.TripleShift(32);
     }
     if ((word & 0x0000FFFF) == 0)
     {
         wordShift += 16;
         word       = word.TripleShift(16);
     }
     if ((word & 0x000000FF) == 0)
     {
         wordShift += 8;
         word       = word.TripleShift(8);
     }
     indexArray = BitUtil.BitList((byte)word);
 }
Ejemplo n.º 2
0
 // 64 bit shifts
 private void Shift()
 {
     if ((int)word == 0)
     {
         wordShift += 32;
         word       = (long)((ulong)word >> 32);
     }
     if ((word & 0x0000FFFF) == 0)
     {
         wordShift += 16;
         word       = (long)((ulong)word >> 16);
     }
     if ((word & 0x000000FF) == 0)
     {
         wordShift += 8;
         word       = (long)((ulong)word >> 8);
     }
     indexArray = BitUtil.BitList((byte)word);
 }
Ejemplo n.º 3
0
 public override int NextDoc()
 {
     if (BitList != 0) // there are remaining bits in the current word
     {
         DocID_Renamed = (WordNum << 3) | ((BitList & 0x0F) - 1);
         BitList       = (int)((uint)BitList >> 4);
         return(DocID_Renamed);
     }
     NextWord();
     if (WordNum == int.MaxValue)
     {
         return(DocID_Renamed = NO_MORE_DOCS);
     }
     BitList = BitUtil.BitList(Word);
     Debug.Assert(BitList != 0);
     DocID_Renamed = (WordNum << 3) | ((BitList & 0x0F) - 1);
     BitList       = (int)((uint)BitList >> 4);
     return(DocID_Renamed);
 }
Ejemplo n.º 4
0
 public override int NextDoc()
 {
     if (bitList != 0) // there are remaining bits in the current word
     {
         docID   = (wordNum << 3) | ((bitList & 0x0F) - 1);
         bitList = (int)((uint)bitList >> 4);
         return(docID);
     }
     NextWord();
     if (wordNum == int.MaxValue)
     {
         return(docID = NO_MORE_DOCS);
     }
     bitList = BitUtil.BitList(word);
     Debug.Assert(bitList != 0);
     docID   = (wordNum << 3) | ((bitList & 0x0F) - 1);
     bitList = (int)((uint)bitList >> 4);
     return(docID);
 }
Ejemplo n.º 5
0
 public override int NextDoc()
 {
     if (bitList != 0) // there are remaining bits in the current word
     {
         docID   = (wordNum << 3) | ((bitList & 0x0F) - 1);
         bitList = bitList.TripleShift(4);
         return(docID);
     }
     NextWord();
     if (wordNum == int.MaxValue)
     {
         return(docID = NO_MORE_DOCS);
     }
     bitList = BitUtil.BitList(word);
     if (Debugging.AssertsEnabled)
     {
         Debugging.Assert(bitList != 0);
     }
     docID   = (wordNum << 3) | ((bitList & 0x0F) - 1);
     bitList = bitList.TripleShift(4);
     return(docID);
 }