Package org.apfloat.spi
Interface BuilderFactory
- All Known Implementing Classes:
DoubleBuilderFactory,FloatBuilderFactory,IntAparapiBuilderFactory,IntBuilderFactory,LongAparapiBuilderFactory,LongBuilderFactory
public interface BuilderFactory
A
BuilderFactory 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 the ApfloatImpl implementation itself acts as the director,
calling the different builders directly.- Version:
- 1.9.0
- Author:
- Mikko Tommila
-
Method Summary
Modifier and TypeMethodDescriptionvoidgc()Do garbage collection and related things such as empty any reference queues.<T> AdditionBuilder<T> getAdditionBuilder(Class<T> elementType) Returns anAdditionBuilderobject.Returns anApfloatBuilderobject.<T> CarryCRTBuilder<T> getCarryCRTBuilder(Class<T> elementArrayType) Returns aCarryCRTBuilderobject.Returns aConvolutionBuilderobject.Returns aDataStorageBuilderobject.Class<?> Returns the element array type of the data objects created.intReturns the element size of the data objects created, in bytes.Class<?> Returns the element type of the data objects created.Returns anExecutionBuilderobject.Returns aMatrixBuilderobject.Returns anNTTBuilderobject.voidshutdown()Shuts down the builder factory.
-
Method Details
-
getApfloatBuilder
ApfloatBuilder getApfloatBuilder()Returns anApfloatBuilderobject.- Returns:
- An
ApfloatBuilderobject.
-
getDataStorageBuilder
DataStorageBuilder getDataStorageBuilder()Returns aDataStorageBuilderobject.- Returns:
- A
DataStorageBuilderobject.
-
getAdditionBuilder
Returns anAdditionBuilderobject.- Type Parameters:
T- The element type of the additions.- Parameters:
elementType- The element type of the additions.- Returns:
- An
AdditionBuilderobject. - Throws:
IllegalArgumentException- In case of unsupported element type.- Since:
- 1.7.0
-
getConvolutionBuilder
ConvolutionBuilder getConvolutionBuilder()Returns aConvolutionBuilderobject.- Returns:
- A
ConvolutionBuilderobject.
-
getNTTBuilder
-
getMatrixBuilder
MatrixBuilder getMatrixBuilder()Returns aMatrixBuilderobject.- Returns:
- A
MatrixBuilderobject. - Since:
- 1.7.0
-
getCarryCRTBuilder
<T> CarryCRTBuilder<T> getCarryCRTBuilder(Class<T> elementArrayType) throws IllegalArgumentException Returns aCarryCRTBuilderobject.- Type Parameters:
T- The element array type of the carry-CRT.- Parameters:
elementArrayType- The element array type of the carry-CRT.- Returns:
- A
CarryCRTBuilderobject. - Throws:
IllegalArgumentException- In case of unsupported element array type.- Since:
- 1.7.0
-
getExecutionBuilder
ExecutionBuilder getExecutionBuilder()Returns anExecutionBuilderobject.- Returns:
- An
ExecutionBuilderobject. - Since:
- 1.9.0
-
getElementType
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
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
Shuts down the builder factory. Clean-up tasks can be executed by this method. This method is invoked by theApfloatContextwhen cleanupAtExit is enabled.- Throws:
ApfloatRuntimeException- Since:
- 1.6.2
-
gc
Do garbage collection and related things such as empty any reference queues.- Throws:
ApfloatRuntimeException- Since:
- 1.6.2
-