# Class LongTableFNT

java.lang.Object
org.apfloat.internal.LongElementaryModMath
org.apfloat.internal.LongModMath
org.apfloat.internal.LongTableFNT

Direct Known Subclasses:
  `LongNTTStepStrategy, LongTableFNTStrategy`

public class LongTableFNT extends LongModMath
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
Author:
  Mikko Tommila

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `LongTableFNT()`
  Default constructor.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `inverseTableFNT(ArrayAccess arrayAccess, long[] wTable, int[] permutationTable)`
  Inverse (Cooley-Tukey) fast Number Theoretic Transform.
  `void`
  `tableFNT(ArrayAccess arrayAccess, long[] wTable, int[] permutationTable)`
  Forward (Sande-Tukey) fast Number Theoretic Transform.

  ### Methods inherited from class LongModMath

  `createWTable, getForwardNthRoot, getInverseNthRoot, modDivide, modInverse, modPow, negate`

  ### Methods inherited from class LongElementaryModMath

  `getModulus, modAdd, modMultiply, modSubtract, setModulus`

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### LongTableFNT

    public LongTableFNT()
    Default constructor.

- ## Method Details

  - ### tableFNT

    public void tableFNT(ArrayAccess arrayAccess, long[] 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 unity `w` modulo the current modulus.
      `permutationTable` - Table of permutation indexes, or `null` if the data should not be permuted.
    Throws:
      `ApfloatRuntimeException`

  - ### inverseTableFNT

    public void inverseTableFNT(ArrayAccess arrayAccess, long[] 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 unity `w` modulo the current modulus.
      `permutationTable` - Table of permutation indexes, or `null` if the data should not be permuted.
    Throws:
      `ApfloatRuntimeException`