Package org.apfloat.internal
Class DoubleWTables
java.lang.Object
org.apfloat.internal.DoubleElementaryModMath
org.apfloat.internal.DoubleModMath
org.apfloat.internal.DoubleWTables
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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static DoubleModMath
getInstance
(int modulus) static double[]
getInverseWTable
(int modulus, int length) Get a table of inverses of powers of n:th root of unity.static double[]
getWTable
(int modulus, int length) Get a table of powers of n:th root of unity.private static double[]
getWTable
(int modulus, int length, boolean isInverse) Methods inherited from class org.apfloat.internal.DoubleModMath
createWTable, getForwardNthRoot, getInverseNthRoot, modDivide, modInverse, modPow, negate
Methods inherited from class org.apfloat.internal.DoubleElementaryModMath
getModulus, modAdd, modMultiply, modSubtract, setModulus
-
Field Details
-
cache
-
-
Constructor Details
-
DoubleWTables
private DoubleWTables()
-
-
Method Details
-
getWTable
public static double[] 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 double[] 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 double[] getWTable(int modulus, int length, boolean isInverse) -
getInstance
-