# Interface NTTStrategy

All Known Implementing Classes:
`AbstractStepFNTStrategy`, `ColumnSixStepFNTStrategy`, `ColumnTwoPassFNTStrategy`, `DoubleTableFNTStrategy`, `Factor3NTTStrategy`, `FloatTableFNTStrategy`, `IntAparapiFactor3NTTStrategy`, `IntAparapiSixStepFNTStrategy`, `IntTableFNTStrategy`, `LongAparapiFactor3NTTStrategy`, `LongAparapiSixStepFNTStrategy`, `LongTableFNTStrategy`, `SixStepFNTStrategy`, `TwoPassFNTStrategy`

public interface NTTStrategy
Number Theoretic Transform (NTT) strategy. An implementing class could be e.g.
• Fast Number Theoretic Transform (FNT)
• "Four-step" FNT
• "Two-pass" mass storage FNT
• Winograd Fourier Transform Algorithm (WFTA)

Note: an implementing transformation class is required only to be able to perform an inverse transform on data transformed by the same class, not by any other class.

Version:
1.0
Author:
Mikko Tommila
• ## 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.
• ## Method Details

• ### transform

void transform(DataStorage dataStorage, int modulus) throws ApfloatRuntimeException
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.

Parameters:
`dataStorage` - The data to be transformed.
`modulus` - Number of modulus to use (in case the transform supports multiple moduli).
Throws:
`ApfloatRuntimeException`
• ### inverseTransform

void inverseTransform(DataStorage dataStorage, int modulus, long totalTransformLength) throws ApfloatRuntimeException
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.

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

long getTransformLength(long size)
Return the supported transform length for the specified data size.
Parameters:
`size` - Length of the data to be transformed.
Returns:
Length of the transform needed by this transform.