# Class FloatTableFNTStrategy

java.lang.Object
org.apfloat.internal.FloatElementaryModMath
org.apfloat.internal.FloatModMath
org.apfloat.internal.FloatTableFNT
org.apfloat.internal.FloatTableFNTStrategy

All Implemented Interfaces:
  `NTTStrategy`

public class FloatTableFNTStrategy extends FloatTableFNT implements NTTStrategy
Fast Number Theoretic Transform strategy that uses lookup tables for powers of n:th root of unity and permutation indexes.

All access to this class must be externally synchronized.

Version:
  1.15.0
Author:
  Mikko Tommila

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `FloatTableFNTStrategy()`
  Default constructor.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `long`
  `getTransformLength(long size)`
  Return the supported transform length for the specified data size.
  `void`
  `inverseTransform(DataStorage dataStorage, int modulus, long totalTransformLength)`
  Perform an inverse transform on the data.
  `void`
  `transform(DataStorage dataStorage, int modulus)`
  Perform a forward transform on the data.

  ### Methods inherited from class FloatTableFNT

  `inverseTableFNT, tableFNT`

  ### Methods inherited from class FloatModMath

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

  ### Methods inherited from class FloatElementaryModMath

  `getModulus, modAdd, modMultiply, modSubtract, setModulus`

  ### Methods inherited from class Object

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

- ## Constructor Details

  - ### FloatTableFNTStrategy

    public FloatTableFNTStrategy()
    Default constructor.

- ## Method Details

  - ### transform

    public void transform(DataStorage dataStorage, int modulus) throws ApfloatRuntimeException
    Description copied from interface: `NTTStrategy`
    Perform a forward transform on the data.

    Multiple moduli can be used, if the convolution algorithm uses the Chinese Remainder Theorem to calculate the final result.

    Specified by:
      `transform` in interface `NTTStrategy`
    Parameters:
      `dataStorage` - The data to be transformed.
      `modulus` - Number of modulus to use (in case the transform supports multiple moduli).
    Throws:
      `ApfloatRuntimeException`

  - ### inverseTransform

    public void inverseTransform(DataStorage dataStorage, int modulus, long totalTransformLength) throws ApfloatRuntimeException
    Description copied from interface: `NTTStrategy`
    Perform an inverse transform on the data.

    Multiple moduli can be used, if the convolution algorithm uses the Chinese Remainder Theorem to calculate the final result.

    Specified by:
      `inverseTransform` in interface `NTTStrategy`
    Parameters:
      `dataStorage` - The data to be transformed.
      `modulus` - Number of modulus to use (in case the transform supports multiple moduli).
      `totalTransformLength` - Total transform length; the final result elements are divided by this value.
    Throws:
      `ApfloatRuntimeException`

  - ### getTransformLength

    public long getTransformLength(long size)
    Description copied from interface: `NTTStrategy`
    Return the supported transform length for the specified data size.
    Specified by:
      `getTransformLength` in interface `NTTStrategy`
    Parameters:
      `size` - Length of the data to be transformed.
    Returns:
      Length of the transform needed by this transform.