@Test public void testInverseTransform() { BigInteger[] actual = BigNumberTheoreticTransform.inverseTransform( bigintArray(3, 7, 0, 5, 4), bi(3), bi(11)); BigInteger[] expect = bigintArray(6, 0, 10, 7, 2); assertArrayEquals(expect, actual); }
public static BigInteger[] inverseTransform(BigInteger[] invec, BigInteger root, BigInteger mod) { BigInteger[] outvec = transform(invec, root.modInverse(mod), mod); BigInteger scaler = BigInteger.valueOf(invec.length).modInverse(mod); for (int i = 0; i < outvec.length; i++) outvec[i] = outvec[i].multiply(scaler).mod(mod); return outvec; }
BigNumberTheoreticTransform { public static BigInteger[] inverseTransform(BigInteger[] invec, BigInteger root, BigInteger mod) { BigInteger[] outvec = transform(invec, root.modInverse(mod), mod); BigInteger scaler = BigInteger.valueOf(invec.length).modInverse(mod); for (int i = 0; i < outvec.length; i++) outvec[i] = outvec[i].multiply(scaler).mod(mod); return outvec; } }
BigNumberTheoreticTransform { public static BigInteger[] inverseTransform(BigInteger[] invec, BigInteger root, BigInteger mod) { BigInteger[] outvec = transform(invec, root.modInverse(mod), mod); BigInteger scaler = BigInteger.valueOf(invec.length).modInverse(mod); for (int i = 0; i < outvec.length; i++) outvec[i] = outvec[i].multiply(scaler).mod(mod); return outvec; }  }
BigNumberTheoreticTransform { public static BigInteger[] inverseTransform(BigInteger[] invec, BigInteger root, BigInteger mod) { BigInteger[] outvec = transform(invec, root.modInverse(mod), mod); BigInteger scaler = BigInteger.valueOf(invec.length).modInverse(mod); for (int i = 0; i < outvec.length; i++) outvec[i] = outvec[i].multiply(scaler).mod(mod); return outvec; }  static BigInteger[] transform(BigInteger[] invec, BigInteger root, BigInteger mod); static BigInteger[] inverseTransform(BigInteger[] invec, BigInteger root, BigInteger mod); static void transformRadix2(BigInteger[] vector, BigInteger root, BigInteger mod); static BigInteger[] circularConvolve(BigInteger[] vec0, BigInteger[] vec1); static BigInteger findModulus(int vecLen, BigInteger minimum); static BigInteger findGenerator(BigInteger totient, BigInteger mod); static BigInteger findPrimitiveRoot(BigInteger degree, BigInteger totient, BigInteger mod); static boolean isGenerator(BigInteger val, BigInteger totient, BigInteger mod); static boolean isPrimitiveRoot(BigInteger val, BigInteger degree, BigInteger mod); static List<BigInteger> uniquePrimeFactors(BigInteger n); static boolean isPrime(BigInteger n); static BigInteger sqrt(BigInteger x); }
BigNumberTheoreticTransform { public static BigInteger[] inverseTransform(BigInteger[] invec, BigInteger root, BigInteger mod) { BigInteger[] outvec = transform(invec, root.modInverse(mod), mod); BigInteger scaler = BigInteger.valueOf(invec.length).modInverse(mod); for (int i = 0; i < outvec.length; i++) outvec[i] = outvec[i].multiply(scaler).mod(mod); return outvec; }  static BigInteger[] transform(BigInteger[] invec, BigInteger root, BigInteger mod); static BigInteger[] inverseTransform(BigInteger[] invec, BigInteger root, BigInteger mod); static void transformRadix2(BigInteger[] vector, BigInteger root, BigInteger mod); static BigInteger[] circularConvolve(BigInteger[] vec0, BigInteger[] vec1); static BigInteger findModulus(int vecLen, BigInteger minimum); static BigInteger findGenerator(BigInteger totient, BigInteger mod); static BigInteger findPrimitiveRoot(BigInteger degree, BigInteger totient, BigInteger mod); static boolean isGenerator(BigInteger val, BigInteger totient, BigInteger mod); static boolean isPrimitiveRoot(BigInteger val, BigInteger degree, BigInteger mod); static List<BigInteger> uniquePrimeFactors(BigInteger n); static boolean isPrime(BigInteger n); static BigInteger sqrt(BigInteger x);  }