# Class AbstractStepFNTStrategy

java.lang.Object
org.apfloat.internal.AbstractStepFNTStrategy

All Implemented Interfaces:
  `Parallelizable, NTTStrategy`

Direct Known Subclasses:
  `SixStepFNTStrategy, TwoPassFNTStrategy`

public abstract class AbstractStepFNTStrategy extends Object implements NTTStrategy, Parallelizable
Abstract superclass for step-based FNT strategies.

All access to this class must be externally synchronized.

Since:
  1.7.0
Version:
  1.15.0
Author:
  Mikko Tommila
See Also:
  - `NTTStepStrategy`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected NTTStepStrategy`
  `stepStrategy`
  The NTT steps.

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `AbstractStepFNTStrategy()`
  Subclass constructor.
  `protected`
  `AbstractStepFNTStrategy(NTTStepStrategy stepStrategy)`
  Subclass constructor with step strategy.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `long`
  `getTransformLength(long size)`
  Return the supported transform length for the specified data size.
  `protected abstract void`
  `inverseTransform(DataStorage dataStorage, int n1, int n2, long length, long totalTransformLength, int modulus)`
  Inverse transform the data in steps.
  `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.
  `protected abstract void`
  `transform(DataStorage dataStorage, int n1, int n2, long length, int modulus)`
  Transform the data in steps.

  ### Methods inherited from class Object

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

- ## Field Details

  - ### stepStrategy

    protected NTTStepStrategy stepStrategy
    The NTT steps.

- ## Constructor Details

  - ### AbstractStepFNTStrategy

    protected AbstractStepFNTStrategy()
    Subclass constructor.

  - ### AbstractStepFNTStrategy

    protected AbstractStepFNTStrategy(NTTStepStrategy stepStrategy)
    Subclass constructor with step strategy.
    Parameters:
      `stepStrategy` - The step strategy to use.

- ## 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.

  - ### transform

    protected abstract void transform(DataStorage dataStorage, int n1, int n2, long length, int modulus) throws ApfloatRuntimeException
    Transform the data in steps.
    Parameters:
      `dataStorage` - The data.
      `n1` - Height of the data matrix.
      `n2` - Width of the data matrix.
      `length` - Length of the data.
      `modulus` - Which modulus to use.
    Throws:
      `ApfloatRuntimeException`

  - ### inverseTransform

    protected abstract void inverseTransform(DataStorage dataStorage, int n1, int n2, long length, long totalTransformLength, int modulus) throws ApfloatRuntimeException
    Inverse transform the data in steps.
    Parameters:
      `dataStorage` - The data.
      `n1` - Height of the data matrix.
      `n2` - Width of the data matrix.
      `length` - Length of the data.
      `totalTransformLength` - Total transform length.
      `modulus` - Which modulus to use.
    Throws:
      `ApfloatRuntimeException`