cc.redberry.core.tensor
Class ProductBuilder
- java.lang.Object
-
- cc.redberry.core.tensor.ProductBuilder
-
- All Implemented Interfaces:
- TensorBuilder
public final class ProductBuilder extends java.lang.Object implements TensorBuilder
Implementation of product builder. It performs basic simplifications and reduces the resulting product to the standard form.- Since:
- 1.0
-
-
Constructor Summary
Constructors Constructor and Description ProductBuilder()Creates builder with default initial capacity.ProductBuilder(int initialCapacityIndexless, int initialCapacityData)Creates builder with initial capacities of indexless and indexed parts.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description Tensorbuild()Builds the tensor.ProductBuilderclone()voidput(Tensor tensor)Method to sequentially add sub-tensors to the future tensor.
-
-
-
Constructor Detail
-
ProductBuilder
public ProductBuilder(int initialCapacityIndexless, int initialCapacityData)Creates builder with initial capacities of indexless and indexed parts.- Parameters:
initialCapacityIndexless- initial capacity of indexless datainitialCapacityData- initial capacity of indexed data
-
ProductBuilder
public ProductBuilder()
Creates builder with default initial capacity.
-
-
Method Detail
-
build
public Tensor build()
Description copied from interface:TensorBuilderBuilds the tensor. This method should be called only once for the particular object.- Specified by:
buildin interfaceTensorBuilder- Returns:
- resulting tensor
-
put
public void put(Tensor tensor)
Description copied from interface:TensorBuilderMethod to sequentially add sub-tensors to the future tensor.- Specified by:
putin interfaceTensorBuilder- Parameters:
tensor- sub-tensor to be added
-
clone
public ProductBuilder clone()
- Specified by:
clonein interfaceTensorBuilder- Overrides:
clonein classjava.lang.Object
-
-
DataMelt 3.0 © DataMelt by jWork.ORG