Class BroadWord
Methods and constants inspired by the article "Broadword Implementation of Rank/Select Queries" by Sebastiano Vigna, January 30, 2012:
- algorithm 1: Lucene.Net.Util.BroadWord.BitCount(System.Int64), count of set bits in a
- algorithm 2: Select(Int64, Int32), selection of a set bit in a
, - bytewise signed smaller <8 operator: SmallerUpTo7_8(Int64, Int64).
- shortwise signed smaller <16 operator: SmallerUpto15_16(Int64, Int64).
- some of the Lk and Hk constants that are used by the above: L8 L8_L, H8 H8_L, L9 L9_L, L16 L16_Land H16 H8_L.
Inheritance
Assembly: DistributedLucene.Net.dll
Syntax
public sealed class BroadWord : object
Fields
Name | Description |
---|---|
H16_L | |
H8_L | Hk = Lk << (k-1) .
These contain the high bit of each group of k bits.
The suffix _L indicates the |
L16_L | |
L8_L | Lk denotes the constant whose ones are in position 0, k, 2k, . . .
These contain the low bit of each group of k bits.
The suffix _L indicates the |
L9_L |
Methods
Name | Description |
---|---|
NotEquals0_8(Int64) | An unsigned bytewise not equals 0 operator.
This uses the following numbers of basic |
Select(Int64, Int32) | Select a 1-bit from a |
SelectNaive(Int64, Int32) | Naive implementation of Select(Int64, Int32), using NumberOfLeadingZeros(Int64) repetitively. Works relatively fast for low ranks. |
Smalleru_8(Int64, Int64) | An unsigned bytewise smaller <8 operator.
This uses the following numbers of basic |
SmallerUpto15_16(Int64, Int64) | A bytewise smaller <16 operator.
This uses the following numbers of basic |
SmallerUpTo7_8(Int64, Int64) | A signed bytewise smaller <8 operator, for operands 0L<= x, y <=0x7L.
This uses the following numbers of basic |