The BitUtil type exposes the following members.

Methods

  NameDescription
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodStatic memberIsPowerOfTwo(Int32)
returns true if v is a power of two or zero
Public methodStatic memberIsPowerOfTwo(Int64)
returns true if v is a power of two or zero
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodStatic memberNextHighestPowerOfTwo(Int32)
returns the next highest power of two, or the current value if it's already a power of two or zero
Public methodStatic memberNextHighestPowerOfTwo(Int64)
returns the next highest power of two, or the current value if it's already a power of two or zero
Public methodStatic memberNtz(Int32)
Returns number of trailing zeros in a 32 bit int value.
Public methodStatic memberNtz(Int64)
Returns number of trailing zeros in a 64 bit long value.
Public methodStatic memberNtz2
returns 0 based index of first set bit (only works for x!=0)
This is an alternate implementation of ntz()
Public methodStatic memberNtz3
returns 0 based index of first set bit
This is an alternate implementation of ntz()
Public methodStatic memberPop
Returns the number of bits set in the long
Public methodStatic memberPop_andnot
Returns the popcount or cardinality of A & ~B Neither array is modified.
Public methodStatic memberPop_array
Returns the number of set bits in an array of longs.
Public methodStatic memberPop_intersect
Returns the popcount or cardinality of the two sets after an intersection. Neither array is modified.
Public methodStatic memberPop_union
Returns the popcount or cardinality of the union of two sets. Neither array is modified.
Public methodStatic memberPop_xor
Public methodToString
Returns a String that represents the current Object.
(Inherited from Object.)

See Also