Package org.apfloat.internal
Class IntWTables
- java.lang.Object
-
- org.apfloat.internal.IntElementaryModMath
-
- org.apfloat.internal.IntModMath
-
- org.apfloat.internal.IntWTables
-
public class IntWTables extends IntModMath
Helper class for generating and caching tables of powers of the n:th root of unity.- Since:
- 1.7.0
- Version:
- 1.9.0
-
-
Field Summary
Fields Modifier and Type Field Description private static java.util.concurrent.ConcurrentMap<java.util.List<java.lang.Integer>,int[]>
cache
-
Constructor Summary
Constructors Modifier Constructor Description private
IntWTables()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static IntModMath
getInstance(int modulus)
static int[]
getInverseWTable(int modulus, int length)
Get a table of inverses of powers of n:th root of unity.static int[]
getWTable(int modulus, int length)
Get a table of powers of n:th root of unity.private static int[]
getWTable(int modulus, int length, boolean isInverse)
-
Methods inherited from class org.apfloat.internal.IntModMath
createWTable, getForwardNthRoot, getInverseNthRoot, modDivide, modInverse, modPow, negate
-
Methods inherited from class org.apfloat.internal.IntElementaryModMath
getModulus, modAdd, modMultiply, modSubtract, setModulus
-
-
-
-
Method Detail
-
getWTable
public static int[] getWTable(int modulus, int length)
Get a table of powers of n:th root of unity.- Parameters:
modulus
- The index of the modulus to be used.length
- The length of the table to be returned, i.e. n.- Returns:
- The table of powers of the n:th root of unity.
-
getInverseWTable
public static int[] getInverseWTable(int modulus, int length)
Get a table of inverses of powers of n:th root of unity.- Parameters:
modulus
- The index of the modulus to be used.length
- The length of the table to be returned, i.e. n.- Returns:
- The table of inverses of powers of the n:th root of unity.
-
getWTable
private static int[] getWTable(int modulus, int length, boolean isInverse)
-
getInstance
private static IntModMath getInstance(int modulus)
-
-