Package com.yahoo.tensor
Interface Tensor.Builder
-
- All Known Implementing Classes:
IndexedTensor.BoundBuilder
,IndexedTensor.Builder
,MappedTensor.Builder
,MixedTensor.BoundBuilder
,MixedTensor.Builder
,MixedTensor.UnboundBuilder
- Enclosing interface:
- Tensor
public static interface Tensor.Builder
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
Tensor.Builder.CellBuilder
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Tensor
build()
Tensor.Builder.CellBuilder
cell()
Return a cell builderTensor.Builder
cell(double value, long... labels)
Add a cellTensor.Builder
cell(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)
Tensor.Builder
cell(TensorAddress address, double value)
Add a cellTensor.Builder
cell(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
of(String typeSpec)
Creates a suitable builder for the given type specTensorType
type()
Returns the type this is building
-
-
-
Method Detail
-
of
static Tensor.Builder of(String typeSpec)
Creates a suitable builder for the given type spec
-
of
static Tensor.Builder of(TensorType type)
Creates a suitable builder for the given type
-
of
static Tensor.Builder of(TensorType type, DimensionSizes dimensionSizes)
Creates a suitable builder for the given type
-
type
TensorType type()
Returns the type this is building
-
cell
Tensor.Builder.CellBuilder cell()
Return a cell builder
-
cell
Tensor.Builder cell(TensorAddress address, double value)
Add a cell
-
cell
Tensor.Builder cell(TensorAddress address, float value)
-
cell
Tensor.Builder cell(double value, long... labels)
Add a cell
-
cell
Tensor.Builder cell(float value, long... labels)
-
cell
default Tensor.Builder cell(Tensor.Cell cell, double value)
Add a cell- Parameters:
cell
- a cell providing the location at which to add this cellvalue
- the value to assign to the cell
-
cell
default Tensor.Builder cell(Tensor.Cell cell, float value)
-
cell
default Tensor.Builder cell(Tensor.Cell cell)
Adds the given cell to this tensor
-
build
Tensor build()
-
-