Package it.unimi.dsi.test
Class XorShiftPoly
java.lang.Object
it.unimi.dsi.test.XorShiftPoly
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic int
The number of bits of state of the generator.static final BigInteger[]
An array of cofactors.static final BigInteger[]
Factors of the Fermat “primes” up to the eleventh (22048 + 1).static int
The actual number of valid entries incofactor
.static BigInteger
The period of the generator (2bits
− 1). -
Method Summary
Modifier and TypeMethodDescriptionstatic void
static void
mPow
(BigInteger e) Computes the power to a given exponent, given the quadratures.
-
Field Details
-
bits
public static int bitsThe number of bits of state of the generator. -
twoToBitsMinus1
The period of the generator (2bits
− 1). -
factor
Factors of the Fermat “primes” up to the eleventh (22048 + 1). -
cofactor
An array of cofactors. Entry 0 ≤i
<numCofactors
containstwoToBitsMinus1
divided byfactor[i]
. Note that some entries can benull
ifbits
is less then 4096. -
numCofactors
public static int numCofactorsThe actual number of valid entries incofactor
.
-
-
Method Details
-
mPow
Computes the power to a given exponent, given the quadratures.- Parameters:
e
- an exponent smaller than or equal to 2bits
.
-
main
-