org.apfloat.internal
Class LongConvolutionBuilder
java.lang.Object
|
+--org.apfloat.internal.LongConvolutionBuilder
- All Implemented Interfaces:
- ConvolutionBuilder
- public class LongConvolutionBuilder
- extends java.lang.Object
- implements ConvolutionBuilder
Creates convolutions of suitable type for the specified length for the long
type.
Based on a work estimate, depending on the operand sizes, the O(n2)
"schoolboy" and the NTT algorithms are chosen e.g. as follows:
size1 | size2 | Algorithm |
16 | 16 | Schoolboy |
16 | 256 | Schoolboy |
32 | 32 | Schoolboy |
32 | 256 | Schoolboy |
64 | 64 | NTT |
64 | 256 | NTT |
64 | 65536 | Schoolboy |
128 | 128 | NTT |
128 | 65536 | NTT |
128 | 4294967296 | Schoolboy |
256 | 256 | NTT |
256 | 281474976710656 | NTT |
- See Also:
LongShortConvolutionStrategy
,
LongMediumConvolutionStrategy
,
Long3NTTConvolutionStrategy
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LongConvolutionBuilder
public LongConvolutionBuilder()
- Default constructor.
createConvolution
public ConvolutionStrategy createConvolution(int radix,
long size1,
long size2,
long resultSize)
- Description copied from interface:
ConvolutionBuilder
- Returns a convolution strategy of suitable
type for the specified length.
- Specified by:
createConvolution
in interface ConvolutionBuilder
- Parameters:
radix
- The radix that will be used.size1
- Length of first data set.size2
- Length of second data set.resultSize
- Minimum number of elements needed in the result data.
- Returns:
- A suitable object for performing the convolution.