Package com.yahoo.tensor
Class DimensionSizes
java.lang.Object
com.yahoo.tensor.DimensionSizes
The sizes of a set of dimensions.
- Author:
- bratseth
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilder of a set of dimension sizes. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the number of dimensions this provides the size ofbooleaninthashCode()static DimensionSizesof(TensorType type) Create sizes from a type containing bound indexed dimensions only.longsize(int dimensionIndex) Returns the length of this in the nth dimensionlongReturns the product of the sizes of this
-
Method Details
-
of
Create sizes from a type containing bound indexed dimensions only.- Throws:
IllegalStateException- if the type contains dimensions which are not bound and indexed
-
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 -
totalSize
public long totalSize()Returns the product of the sizes of this -
equals
-
hashCode
public int hashCode()
-