public final class BitVectorMath
extends java.lang.Object
BitVectorMath class contains utility methods and classes to perform operations
with bit vectors.| Modifier and Type | Class and Description |
|---|---|
static class |
BitVectorMath.Operands
Describes the number of arguments accepted by the bit vector operations.
|
static class |
BitVectorMath.Operations
Provides singleton objects that allow performing operations with bit vectors in
a unified way (i.e.
|
| Modifier and Type | Method and Description |
|---|---|
static BitVector |
add(BitVector lhs,
BitVector rhs) |
static BitVector |
and(BitVector lhs,
BitVector rhs) |
static BitVector |
andr(BitVector bv) |
static BitVector |
ashr(BitVector v,
java.math.BigInteger to) |
static BitVector |
ashr(BitVector v,
BitVector to)
Performs arithmetical right shift of the specified bit vector by the specified shift amount.
|
static BitVector |
ashr(BitVector v,
int to) |
static BitVector |
eq(BitVector lhs,
BitVector rhs) |
static BitVector |
lshr(BitVector v,
java.math.BigInteger to) |
static BitVector |
lshr(BitVector v,
BitVector to)
Performs logical right shift of the specified bit vector by the specified shift amount.
|
static BitVector |
lshr(BitVector v,
int to) |
static BitVector |
mul(BitVector lhs,
BitVector rhs) |
static BitVector |
nand(BitVector lhs,
BitVector rhs) |
static BitVector |
neg(BitVector v) |
static BitVector |
neq(BitVector lhs,
BitVector rhs) |
static BitVector |
nor(BitVector lhs,
BitVector rhs) |
static BitVector |
not(BitVector v) |
static BitVector |
or(BitVector lhs,
BitVector rhs) |
static BitVector |
orr(BitVector bv) |
static BitVector |
plus(BitVector v) |
static BitVector |
rotl(BitVector v,
java.math.BigInteger to) |
static BitVector |
rotl(BitVector v,
BitVector to)
Performs rotation to the left of the specified bit vector by the specified shift amount.
|
static BitVector |
rotl(BitVector v,
int to) |
static BitVector |
rotr(BitVector v,
java.math.BigInteger to) |
static BitVector |
rotr(BitVector v,
BitVector to)
Performs rotation to the right of the specified bit vector by the specified shift amount.
|
static BitVector |
rotr(BitVector v,
int to) |
static BitVector |
sdiv(BitVector lhs,
BitVector rhs) |
static BitVector |
sge(BitVector lhs,
BitVector rhs) |
static BitVector |
sgt(BitVector lhs,
BitVector rhs) |
static BitVector |
shl(BitVector v,
java.math.BigInteger to) |
static BitVector |
shl(BitVector v,
BitVector to)
Performs logical left shift of the specified bit vector by the specified shift amount.
|
static BitVector |
shl(BitVector v,
int to) |
static BitVector |
sle(BitVector lhs,
BitVector rhs) |
static BitVector |
slt(BitVector lhs,
BitVector rhs) |
static BitVector |
smod(BitVector lhs,
BitVector rhs) |
static BitVector |
srem(BitVector lhs,
BitVector rhs) |
static BitVector |
sub(BitVector lhs,
BitVector rhs) |
static BitVector |
udiv(BitVector lhs,
BitVector rhs) |
static BitVector |
uge(BitVector lhs,
BitVector rhs) |
static BitVector |
ugt(BitVector lhs,
BitVector rhs) |
static BitVector |
ule(BitVector lhs,
BitVector rhs) |
static BitVector |
ult(BitVector lhs,
BitVector rhs) |
static BitVector |
urem(BitVector lhs,
BitVector rhs) |
static BitVector |
xnor(BitVector lhs,
BitVector rhs) |
static BitVector |
xor(BitVector lhs,
BitVector rhs) |
static BitVector |
xorr(BitVector bv) |
public static BitVector shl(BitVector v, BitVector to)
to modulo v.getBitSize(). If the
actual shift amount equals 0, no shift is performed and the initial bit vector is
returned. Otherwise, a new copy of data is created and returned. If the shift amount is
negative, the actual shift amount is calculated as v.getBitSize() minus
(to modulo v.getBitSize()).v - Bit vector to be shifted.to - Shift amount.java.lang.IllegalArgumentException - if any of the parameters is null.public static BitVector lshr(BitVector v, BitVector to)
to modulo v.getBitSize(). If the
actual shift amount equals 0, no shift is performed and the initial bit vector is
returned. Otherwise, a new copy of data is created and returned. If the shift amount is
negative, the actual shift amount is calculated as v.getBitSize() minus
(to modulo v.getBitSize()).v - Bit vector to be shifted.to - Shift amount.java.lang.IllegalArgumentException - if any of the parameters is null.public static BitVector ashr(BitVector v, BitVector to)
to modulo v.getBitSize(). If the
actual shift amount equals 0, no shift is performed and the initial bit vector is
returned. Otherwise, a new copy of data is created and returned. If the shift amount is
negative, the actual shift amount is calculated as v.getBitSize() minus
(to modulo v.getBitSize()).v - Bit vector to be shifted.to - Shift amount.java.lang.IllegalArgumentException - if any of the parameters is null.public static BitVector rotl(BitVector v, BitVector to)
to modulo v.getBitSize(). If the
actual shift amount equals 0, no shift is performed and the initial bit vector is
returned. Otherwise, a new copy of data is created and returned. If the shift amount is
negative, the actual shift amount is calculated as v.getBitSize() minus
(to modulo v.getBitSize()).v - Bit vector to be shifted.to - Shift amount.java.lang.IllegalArgumentException - if any of the parameters is null.public static BitVector rotr(BitVector v, BitVector to)
to modulo v.getBitSize(). If the
actual shift amount equals 0, no shift is performed and the initial bit vector is
returned. Otherwise, a new copy of data is created and returned. If the shift amount is
negative, the actual shift amount is calculated as v.getBitSize() minus
(to modulo v.getBitSize()).v - Bit vector to be shifted.to - Shift amount.java.lang.IllegalArgumentException - if any of the parameters is null.