BitVector Type
Represents a bit vector, which is a sequence of bits. This type internally
uses two different representations to represent a bit vector depending on
its size. The numeric value of the bit vector is stored in little-endian
order. For those with less than or equal to 64 bits, it uses uint64
.
For those with more than 64 bits, it uses bigint
. This is to avoid
the overhead of using bigint
for small numbers as most CPU operations
are in 64 bits or less. N.B. SmallValue becomes zero when the Length becomes
greater than 64. We intentionally do not sync SmallValue and BigValue for
performance reasons.
Constructors
Constructor | Description |
|
|
Full Usage:
BitVector(bi, bitLen)
Parameters:
bigint
bitLen : int<MeasureProduct<rt, MeasureOne>>
Returns: BitVector
|
|
Full Usage:
BitVector(i32, bitLen)
Parameters:
int32
bitLen : int<MeasureProduct<rt, MeasureOne>>
Returns: BitVector
|
|
Full Usage:
BitVector(u32, bitLen)
Parameters:
uint32
bitLen : int<MeasureProduct<rt, MeasureOne>>
Returns: BitVector
|
|
Full Usage:
BitVector(i64, bitLen)
Parameters:
int64
bitLen : int<MeasureProduct<rt, MeasureOne>>
Returns: BitVector
|
|
Full Usage:
BitVector(u64, bitLen)
Parameters:
uint64
bitLen : int<MeasureProduct<rt, MeasureOne>>
Returns: BitVector
|
Instance members
Instance member | Description |
Full Usage:
this.BigValue
Returns: bigint
|
|
Full Usage:
this.IsFalse
Returns: bool
|
|
Full Usage:
this.IsOne
Returns: bool
|
|
Full Usage:
this.IsTrue
Returns: bool
|
|
Full Usage:
this.IsZero
Returns: bool
|
|
|
|
Full Usage:
this.SmallValue
Returns: uint64
|
Static members
Static member | Description |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Full Usage:
BitVector.SignedMax(rt)
Parameters:
int<MeasureProduct<rt, MeasureOne>>
Returns: BitVector
|
|
Full Usage:
BitVector.SignedMin(rt)
Parameters:
int<MeasureProduct<rt, MeasureOne>>
Returns: BitVector
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Full Usage:
BitVector.UnsignedMax(rt)
Parameters:
int<MeasureProduct<rt, MeasureOne>>
Returns: BitVector
|
|
|
|
|
|
|
|
Full Usage:
BitVector.Zero(t)
Parameters:
int<MeasureProduct<rt, MeasureOne>>
Returns: BitVector
|