Package com.yahoo.tensor
Class MixedTensor.UnboundBuilder
- java.lang.Object
-
- com.yahoo.tensor.MixedTensor.Builder
-
- com.yahoo.tensor.MixedTensor.UnboundBuilder
-
- All Implemented Interfaces:
Tensor.Builder
- Enclosing class:
- MixedTensor
public static class MixedTensor.UnboundBuilder extends MixedTensor.Builder
Temporarily stores all cells to find bounds of indexed dimensions, then creates a tensor using BoundBuilder. This is due to the fact that for serialization the size of the dense subspace must be known, and equal for all dense subspaces. A side effect is that the tensor type is effectively changed, such that unbound indexed dimensions become bound.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.yahoo.tensor.Tensor.Builder
Tensor.Builder.CellBuilder
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MixedTensor
build()
Tensor.Builder
cell(TensorAddress address, double value)
Add a cellTensor.Builder
cell(TensorAddress address, float value)
TensorType
createBoundType()
void
trackBounds(TensorAddress address)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.yahoo.tensor.Tensor.Builder
cell, cell, cell
-
-
-
-
Method Detail
-
cell
public Tensor.Builder cell(TensorAddress address, float value)
-
cell
public Tensor.Builder cell(TensorAddress address, double value)
Description copied from interface:Tensor.Builder
Add a cell
-
build
public MixedTensor build()
- Specified by:
build
in interfaceTensor.Builder
- Specified by:
build
in classMixedTensor.Builder
-
trackBounds
public void trackBounds(TensorAddress address)
-
createBoundType
public TensorType createBoundType()
-
-