public class LongTableFNTStrategy extends LongTableFNT implements NTTStrategy
All access to this class must be externally synchronized.
Constructor and Description |
---|
LongTableFNTStrategy()
Default constructor.
|
Modifier and Type | Method and 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.
|
inverseTableFNT, tableFNT
createWTable, getForwardNthRoot, getInverseNthRoot, modDivide, modInverse, modPow, negate
getModulus, modAdd, modMultiply, modSubtract, setModulus
public void transform(DataStorage dataStorage, int modulus) throws ApfloatRuntimeException
NTTStrategy
Multiple moduli can be used, if the convolution algorithm uses the Chinese Remainder Theorem to calculate the final result.
transform
in interface NTTStrategy
dataStorage
- The data to be transformed.modulus
- Number of modulus to use (in case the transform supports multiple moduli).ApfloatRuntimeException
public void inverseTransform(DataStorage dataStorage, int modulus, long totalTransformLength) throws ApfloatRuntimeException
NTTStrategy
Multiple moduli can be used, if the convolution algorithm uses the Chinese Remainder Theorem to calculate the final result.
inverseTransform
in interface NTTStrategy
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.ApfloatRuntimeException
public long getTransformLength(long size)
NTTStrategy
getTransformLength
in interface NTTStrategy
size
- Length of the data to be transformed.Copyright © 2017. All rights reserved.