The BitUtil type exposes the following members.
Constructors
Methods
| Name | Description | |
|---|---|---|
| Equals | (Inherited from Object.) | |
| Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.) | |
| GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
| GetType | Gets the Type of the current instance. (Inherited from Object.) | |
| IsPowerOfTwo(Int32) | returns true if v is a power of two or zero | |
| IsPowerOfTwo(Int64) | returns true if v is a power of two or zero | |
| MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
| NextHighestPowerOfTwo(Int32) | returns the next highest power of two, or the current value if it's already a power of two or zero | |
| NextHighestPowerOfTwo(Int64) | returns the next highest power of two, or the current value if it's already a power of two or zero | |
| Ntz(Int32) | Returns number of trailing zeros in a 32 bit int value. | |
| Ntz(Int64) | Returns number of trailing zeros in a 64 bit long value. | |
| Ntz2 | returns 0 based index of first set bit
(only works for x!=0)
This is an alternate implementation of ntz() | |
| Ntz3 | returns 0 based index of first set bit
This is an alternate implementation of ntz() | |
| Pop | Returns the number of bits set in the long | |
| Pop_andnot | Returns the popcount or cardinality of A & ~B
Neither array is modified.
| |
| Pop_array | Returns the number of set bits in an array of longs. | |
| Pop_intersect | Returns the popcount or cardinality of the two sets after an intersection.
Neither array is modified.
| |
| Pop_union | Returns the popcount or cardinality of the union of two sets.
Neither array is modified.
| |
| Pop_xor | ||
| ToString | (Inherited from Object.) |
Fields
| Name | Description | |
|---|---|---|
| ntzTable | table of number of trailing zeros in a byte |