Lucene.Net
3.0.3
Lucene.Net is a .NET port of the Java Lucene Indexing Library
|
A variety of high efficiencly bit twiddling routines. More...
Static Public Member Functions | |
static int | Pop (long x) |
Returns the number of bits set in the long | |
static long | Pop_array (long[] A, int wordOffset, int numWords) |
Returns the number of set bits in an array of longs. | |
static long | Pop_intersect (long[] A, long[] B, int wordOffset, int numWords) |
Returns the popcount or cardinality of the two sets after an intersection. Neither array is modified. | |
static long | Pop_union (long[] A, long[] B, int wordOffset, int numWords) |
Returns the popcount or cardinality of the union of two sets. Neither array is modified. | |
static long | Pop_andnot (long[] A, long[] B, int wordOffset, int numWords) |
Returns the popcount or cardinality of A & ~B Neither array is modified. | |
static long | Pop_xor (long[] A, long[] B, int wordOffset, int numWords) |
static int | Ntz (long val) |
Returns number of trailing zeros in a 64 bit long value. | |
static int | Ntz (int val) |
Returns number of trailing zeros in a 32 bit int value. | |
static int | Ntz2 (long x) |
returns 0 based index of first set bit (only works for x!=0) This is an alternate implementation of ntz() | |
static int | Ntz3 (long x) |
returns 0 based index of first set bit This is an alternate implementation of ntz() | |
static bool | IsPowerOfTwo (int v) |
returns true if v is a power of two or zero | |
static bool | IsPowerOfTwo (long v) |
returns true if v is a power of two or zero | |
static int | NextHighestPowerOfTwo (int v) |
returns the next highest power of two, or the current value if it's already a power of two or zero | |
static long | NextHighestPowerOfTwo (long v) |
returns the next highest power of two, or the current value if it's already a power of two or zero | |
Static Public Attributes | |
static readonly byte[] | ntzTable |
table of number of trailing zeros in a byte | |
A variety of high efficiencly bit twiddling routines.
<version> $Id$ </version>
Definition at line 30 of file BitUtil.cs.
|
static |
returns true if v is a power of two or zero
Definition at line 856 of file BitUtil.cs.
|
static |
returns true if v is a power of two or zero
Definition at line 862 of file BitUtil.cs.
|
static |
returns the next highest power of two, or the current value if it's already a power of two or zero
Definition at line 868 of file BitUtil.cs.
|
static |
returns the next highest power of two, or the current value if it's already a power of two or zero
Definition at line 881 of file BitUtil.cs.
|
static |
Returns number of trailing zeros in a 64 bit long value.
Definition at line 726 of file BitUtil.cs.
|
static |
Returns number of trailing zeros in a 32 bit int value.
Definition at line 776 of file BitUtil.cs.
|
static |
returns 0 based index of first set bit (only works for x!=0)
This is an alternate implementation of ntz()
Definition at line 800 of file BitUtil.cs.
|
static |
returns 0 based index of first set bit
This is an alternate implementation of ntz()
Definition at line 822 of file BitUtil.cs.
|
static |
Returns the number of bits set in the long
Definition at line 34 of file BitUtil.cs.
|
static |
Returns the popcount or cardinality of A & ~B Neither array is modified.
Definition at line 450 of file BitUtil.cs.
|
static |
Returns the number of set bits in an array of longs.
Definition at line 60 of file BitUtil.cs.
|
static |
Returns the popcount or cardinality of the two sets after an intersection. Neither array is modified.
Definition at line 204 of file BitUtil.cs.
|
static |
Returns the popcount or cardinality of the union of two sets. Neither array is modified.
Definition at line 324 of file BitUtil.cs.
|
static |
Definition at line 573 of file BitUtil.cs.
|
static |
table of number of trailing zeros in a byte
Definition at line 708 of file BitUtil.cs.