public static class MappedTensor.Builder extends Object implements Tensor.Builder
Tensor.Builder.CellBuilder
Modifier and Type | Field and Description |
---|---|
private com.google.common.collect.ImmutableMap.Builder<TensorAddress,Double> |
cells |
private TensorType |
type |
Modifier | Constructor and Description |
---|---|
private |
Builder(TensorType type) |
Modifier and Type | Method and Description |
---|---|
MappedTensor |
build() |
Tensor.Builder.CellBuilder |
cell()
Return a cell builder
|
MappedTensor.Builder |
cell(double value,
long... labels)
Add a cell
|
MappedTensor.Builder |
cell(TensorAddress address,
double value)
Add a cell
|
static MappedTensor.Builder |
of(TensorType type)
Creates a suitable builder for the given type
|
TensorType |
type()
Returns the type this is building
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
cell, of
private final TensorType type
private final com.google.common.collect.ImmutableMap.Builder<TensorAddress,Double> cells
private Builder(TensorType type)
public static MappedTensor.Builder of(TensorType type)
Tensor.Builder
of
in interface Tensor.Builder
public Tensor.Builder.CellBuilder cell()
Tensor.Builder
cell
in interface Tensor.Builder
public TensorType type()
Tensor.Builder
type
in interface Tensor.Builder
public MappedTensor.Builder cell(TensorAddress address, double value)
Tensor.Builder
cell
in interface Tensor.Builder
public MappedTensor.Builder cell(double value, long... labels)
Tensor.Builder
cell
in interface Tensor.Builder
public MappedTensor build()
build
in interface Tensor.Builder
Copyright © 2018. All rights reserved.