C# Class Lucene.Net.Util.OpenBitSetIterator

An iterator to iterate over set bits in an OpenBitSet. this is faster than nextSetBit() for iterating over the complete set of bits, especially when the density of the bits set is high.
Inheritance: Lucene.Net.Search.DocIdSetIterator
Afficher le fichier Open project: synhershko/lucene.net Class Usage Examples

Méthodes publiques

Méthode Description
Advance ( int target ) : int
DocID ( ) : int
NextDoc ( ) : int

** alternate shift implementations // 32 bit shifts, but a long shift needed at the end private void shift2() { int y = (int)word; if (y==0) {wordShift +=32; y = (int)(word >>>32); } if ((y & 0x0000FFFF) == 0) { wordShift +=16; y>>>=16; } if ((y & 0x000000FF) == 0) { wordShift +=8; y>>>=8; } indexArray = bitlist[y & 0xff]; word >>>= (wordShift +1); } private void shift3() { int lower = (int)word; int lowByte = lower & 0xff; if (lowByte != 0) { indexArray=bitlist[lowByte]; return; } shift(); } ****

OpenBitSetIterator ( OpenBitSet obs ) : System
OpenBitSetIterator ( long bits, int numWords ) : System

Private Methods

Méthode Description
Shift ( ) : void

Method Details

Advance() public méthode

public Advance ( int target ) : int
target int
Résultat int

DocID() public méthode

public DocID ( ) : int
Résultat int

NextDoc() public méthode

** alternate shift implementations // 32 bit shifts, but a long shift needed at the end private void shift2() { int y = (int)word; if (y==0) {wordShift +=32; y = (int)(word >>>32); } if ((y & 0x0000FFFF) == 0) { wordShift +=16; y>>>=16; } if ((y & 0x000000FF) == 0) { wordShift +=8; y>>>=8; } indexArray = bitlist[y & 0xff]; word >>>= (wordShift +1); } private void shift3() { int lower = (int)word; int lowByte = lower & 0xff; if (lowByte != 0) { indexArray=bitlist[lowByte]; return; } shift(); } ****
public NextDoc ( ) : int
Résultat int

OpenBitSetIterator() public méthode

public OpenBitSetIterator ( OpenBitSet obs ) : System
obs OpenBitSet
Résultat System

OpenBitSetIterator() public méthode

public OpenBitSetIterator ( long bits, int numWords ) : System
bits long
numWords int
Résultat System