Package org.apfloat.spi
Interface BuilderFactory
-
- All Known Implementing Classes:
DoubleBuilderFactory
,FloatBuilderFactory
,IntAparapiBuilderFactory
,IntBuilderFactory
,LongAparapiBuilderFactory
,LongBuilderFactory
public interface BuilderFactory
ABuilderFactory
object contains factory methods for building the various parts of an apfloat using the Builder pattern. There is no separate "director" object in the apfloat SPI; it is suggested that theApfloatImpl
implementation itself acts as the director, calling the different builders directly.- Version:
- 1.9.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
gc()
Do garbage collection and related things such as empty any reference queues.<T> AdditionBuilder<T>
getAdditionBuilder(java.lang.Class<T> elementType)
Returns anAdditionBuilder
object.ApfloatBuilder
getApfloatBuilder()
Returns anApfloatBuilder
object.<T> CarryCRTBuilder<T>
getCarryCRTBuilder(java.lang.Class<T> elementArrayType)
Returns aCarryCRTBuilder
object.ConvolutionBuilder
getConvolutionBuilder()
Returns aConvolutionBuilder
object.DataStorageBuilder
getDataStorageBuilder()
Returns aDataStorageBuilder
object.java.lang.Class<?>
getElementArrayType()
Returns the element array type of the data objects created.int
getElementSize()
Returns the element size of the data objects created, in bytes.java.lang.Class<?>
getElementType()
Returns the element type of the data objects created.ExecutionBuilder
getExecutionBuilder()
Returns anExecutionBuilder
object.MatrixBuilder
getMatrixBuilder()
Returns aMatrixBuilder
object.NTTBuilder
getNTTBuilder()
Returns anNTTBuilder
object.void
shutdown()
Shuts down the builder factory.
-
-
-
Method Detail
-
getApfloatBuilder
ApfloatBuilder getApfloatBuilder()
Returns anApfloatBuilder
object.- Returns:
- An
ApfloatBuilder
object.
-
getDataStorageBuilder
DataStorageBuilder getDataStorageBuilder()
Returns aDataStorageBuilder
object.- Returns:
- A
DataStorageBuilder
object.
-
getAdditionBuilder
<T> AdditionBuilder<T> getAdditionBuilder(java.lang.Class<T> elementType) throws java.lang.IllegalArgumentException
Returns anAdditionBuilder
object.- Type Parameters:
T
- The element type of the additions.- Parameters:
elementType
- The element type of the additions.- Returns:
- An
AdditionBuilder
object. - Throws:
java.lang.IllegalArgumentException
- In case of unsupported element type.- Since:
- 1.7.0
-
getConvolutionBuilder
ConvolutionBuilder getConvolutionBuilder()
Returns aConvolutionBuilder
object.- Returns:
- A
ConvolutionBuilder
object.
-
getNTTBuilder
NTTBuilder getNTTBuilder()
Returns anNTTBuilder
object.- Returns:
- An
NTTBuilder
object.
-
getMatrixBuilder
MatrixBuilder getMatrixBuilder()
Returns aMatrixBuilder
object.- Returns:
- A
MatrixBuilder
object. - Since:
- 1.7.0
-
getCarryCRTBuilder
<T> CarryCRTBuilder<T> getCarryCRTBuilder(java.lang.Class<T> elementArrayType) throws java.lang.IllegalArgumentException
Returns aCarryCRTBuilder
object.- Type Parameters:
T
- The element array type of the carry-CRT.- Parameters:
elementArrayType
- The element array type of the carry-CRT.- Returns:
- A
CarryCRTBuilder
object. - Throws:
java.lang.IllegalArgumentException
- In case of unsupported element array type.- Since:
- 1.7.0
-
getExecutionBuilder
ExecutionBuilder getExecutionBuilder()
Returns anExecutionBuilder
object.- Returns:
- An
ExecutionBuilder
object. - Since:
- 1.9.0
-
getElementType
java.lang.Class<?> getElementType()
Returns the element type of the data objects created.- Returns:
- The element type of the data objects created.
- Since:
- 1.7.0
-
getElementArrayType
java.lang.Class<?> getElementArrayType()
Returns the element array type of the data objects created.- Returns:
- The element array type of the data objects created.
- Since:
- 1.7.0
-
getElementSize
int getElementSize()
Returns the element size of the data objects created, in bytes.- Returns:
- The element size of the data objects created, in bytes.
- Since:
- 1.7.0
-
shutdown
void shutdown() throws ApfloatRuntimeException
Shuts down the builder factory. Clean-up tasks can be executed by this method. This method is invoked by theApfloatContext
when cleanupAtExit is enabled.- Throws:
ApfloatRuntimeException
- Since:
- 1.6.2
-
gc
void gc() throws ApfloatRuntimeException
Do garbage collection and related things such as empty any reference queues.- Throws:
ApfloatRuntimeException
- Since:
- 1.6.2
-
-