org.apfloat.internal
Class Int3NTTConvolutionStrategy
java.lang.Object
org.apfloat.internal.IntElementaryModMath
org.apfloat.internal.IntModMath
org.apfloat.internal.Int3NTTConvolutionStrategy
- All Implemented Interfaces:
- ConvolutionStrategy
public class Int3NTTConvolutionStrategy
- extends IntModMath
- implements ConvolutionStrategy
Convolution methods in the transform domain for the int
type.
Multiplication can be done in linear time in the transform domain, where
the multiplication is simply an element-by-element multiplication.
This implementation uses three Number Theoretic Transforms to do the
convolution and the Chinese Remainder Theorem to get the final result.
After transforming the data, the in-place multiplication (or squaring)
of the data elements is done using a parallel algorithm, if the data
fits in memory.
All access to this class must be externally synchronized.
- Version:
- 1.6.1
- Author:
- Mikko Tommila
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Int3NTTConvolutionStrategy
public Int3NTTConvolutionStrategy(int radix,
NTTStrategy transform)
- Creates a new convoluter that uses the specified
transform for transforming the data.
- Parameters:
radix
- The radix that will be used.transform
- The transform that will be used.
convolute
public DataStorage convolute(DataStorage x,
DataStorage y,
long resultSize)
throws ApfloatRuntimeException
- Description copied from interface:
ConvolutionStrategy
- Convolutes the two sets of data.
- Specified by:
convolute
in interface ConvolutionStrategy
- Parameters:
x
- First data set.y
- Second data set.resultSize
- Number of elements needed in the result data.
- Returns:
- The convolved data.
- Throws:
ApfloatRuntimeException