Package com.yahoo.tensor
Interface Tensor.Builder
- All Known Implementing Classes:
IndexedTensor.BoundBuilder
,IndexedTensor.Builder
,MappedTensor.Builder
,MixedTensor.BoundBuilder
,MixedTensor.Builder
- Enclosing interface:
- Tensor
public static interface Tensor.Builder
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
cell()
Return a cell buildercell
(double value, long... labels) Add a cellcell
(float value, long... labels) default Tensor.Builder
cell
(Tensor.Cell cell) Adds the given cell to this tensordefault Tensor.Builder
cell
(Tensor.Cell cell, double value) Add a celldefault Tensor.Builder
cell
(Tensor.Cell cell, float value) cell
(TensorAddress address, double value) Add a cellcell
(TensorAddress address, float value) static Tensor.Builder
of
(TensorType type) Creates a suitable builder for the given typestatic Tensor.Builder
of
(TensorType type, DimensionSizes dimensionSizes) Creates a suitable builder for the given typestatic Tensor.Builder
Creates a suitable builder for the given type spectype()
Returns the type of the tensor this is building
-
Method Details
-
of
Creates a suitable builder for the given type spec -
of
Creates a suitable builder for the given type -
of
Creates a suitable builder for the given type -
type
TensorType type()Returns the type of the tensor this is building -
cell
Tensor.Builder.CellBuilder cell()Return a cell builder -
cell
Add a cell -
cell
-
cell
Add a cell -
cell
-
cell
Add a cell- Parameters:
cell
- a cell providing the location at which to add this cellvalue
- the value to assign to the cell
-
cell
-
cell
Adds the given cell to this tensor -
build
Tensor build()
-