Package com.yahoo.tensor
Class DimensionSizes.Builder
java.lang.Object
com.yahoo.tensor.DimensionSizes.Builder
- Enclosing class:
- DimensionSizes
Builder of a set of dimension sizes.
Dimensions whose size is not set before building will get size 0.
-
Constructor Details
-
Builder
public Builder(int dimensions)
-
-
Method Details
-
set
-
add
-
size
public long size(int dimensionIndex) Returns the length of this in the nth dimension- Throws:
IllegalArgumentException
- if the index is larger than the number of dimensions in this tensor minus one
-
dimensions
public int dimensions()Returns the number of dimensions this provides the size of -
build
Build this. This builder becomes invalid after calling this.
-