Package org.apfloat.internal
Class FloatTableFNT
- java.lang.Object
-
- org.apfloat.internal.FloatElementaryModMath
-
- org.apfloat.internal.FloatModMath
-
- org.apfloat.internal.FloatTableFNT
-
- Direct Known Subclasses:
FloatNTTStepStrategy
,FloatTableFNTStrategy
public class FloatTableFNT extends FloatModMath
Fast Number Theoretic Transform that uses lookup tables for powers of n:th root of unity and permutation indexes.All access to this class must be externally synchronized.
- Since:
- 1.7.0
- Version:
- 1.7.0
-
-
Constructor Summary
Constructors Constructor Description FloatTableFNT()
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
inverseTableFNT(ArrayAccess arrayAccess, float[] wTable, int[] permutationTable)
Inverse (Cooley-Tukey) fast Number Theoretic Transform.void
tableFNT(ArrayAccess arrayAccess, float[] wTable, int[] permutationTable)
Forward (Sande-Tukey) fast Number Theoretic Transform.-
Methods inherited from class org.apfloat.internal.FloatModMath
createWTable, getForwardNthRoot, getInverseNthRoot, modDivide, modInverse, modPow, negate
-
Methods inherited from class org.apfloat.internal.FloatElementaryModMath
getModulus, modAdd, modMultiply, modSubtract, setModulus
-
-
-
-
Method Detail
-
tableFNT
public void tableFNT(ArrayAccess arrayAccess, float[] wTable, int[] permutationTable) throws ApfloatRuntimeException
Forward (Sande-Tukey) fast Number Theoretic Transform. Data length must be a power of two.- Parameters:
arrayAccess
- The data array to transform.wTable
- Table of powers of n:th root of unityw
modulo the current modulus.permutationTable
- Table of permutation indexes, ornull
if the data should not be permuted.- Throws:
ApfloatRuntimeException
-
inverseTableFNT
public void inverseTableFNT(ArrayAccess arrayAccess, float[] wTable, int[] permutationTable) throws ApfloatRuntimeException
Inverse (Cooley-Tukey) fast Number Theoretic Transform. Data length must be a power of two.- Parameters:
arrayAccess
- The data array to transform.wTable
- Table of powers of n:th root of unityw
modulo the current modulus.permutationTable
- Table of permutation indexes, ornull
if the data should not be permuted.- Throws:
ApfloatRuntimeException
-
-