Package it.unimi.dsi.test
Class XorShiftPoly
java.lang.Object
it.unimi.dsi.test.XorShiftPoly
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic intThe 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 intThe actual number of valid entries incofactor.static BigIntegerThe period of the generator (2bits− 1). -
Method Summary
Modifier and TypeMethodDescriptionstatic voidstatic voidmPow(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<numCofactorscontainstwoToBitsMinus1divided byfactor[i]. Note that some entries can benullifbitsis 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
-