org.apfloat.internal
Class IntConvolutionBuilder

java.lang.Object
  extended byorg.apfloat.internal.IntConvolutionBuilder
All Implemented Interfaces:
ConvolutionBuilder

public class IntConvolutionBuilder
extends java.lang.Object
implements ConvolutionBuilder

Creates convolutions of suitable type for the specified length for the int 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:

size1size2Algorithm
1616Schoolboy
16256Schoolboy
3232Schoolboy
32256Schoolboy
6464NTT
64256NTT
6465536Schoolboy
128128NTT
12865536NTT
1284294967296Schoolboy
256256NTT
256281474976710656NTT

Version:
1.0
Author:
Mikko Tommila
See Also:
IntShortConvolutionStrategy, IntMediumConvolutionStrategy, Int3NTTConvolutionStrategy

Constructor Summary
IntConvolutionBuilder()
          Default constructor.
 
Method Summary
 ConvolutionStrategy createConvolution(int radix, long size1, long size2, long resultSize)
          Returns a convolution strategy of suitable type for the specified length.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IntConvolutionBuilder

public IntConvolutionBuilder()
Default constructor.

Method Detail

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.