Package com.yahoo.tensor
Class PartialAddress
- java.lang.Object
-
- com.yahoo.tensor.PartialAddress
-
public class PartialAddress extends Object
An address to a subset of a tensors' cells, specifying a label for some but not necessarily all of the tensors dimensions.- Author:
- bratseth
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PartialAddress.Builder
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TensorAddress
asAddress(TensorType type)
Returns this as an address in the given tensor typeString
dimension(int i)
String
label(int i)
Returns the label at position iString
label(String dimensionName)
Returns the label of this dimension, or null if no label is specified for itlong
numericLabel(String dimensionName)
Returns the numeric label of this dimension, or -1 if no label is specified for itint
size()
String
toString()
-
-
-
Method Detail
-
dimension
public String dimension(int i)
-
numericLabel
public long numericLabel(String dimensionName)
Returns the numeric label of this dimension, or -1 if no label is specified for it
-
label
public String label(String dimensionName)
Returns the label of this dimension, or null if no label is specified for it
-
label
public String label(int i)
Returns the label at position i- Throws:
IllegalArgumentException
- if i is out of bounds
-
size
public int size()
-
asAddress
public TensorAddress asAddress(TensorType type)
Returns this as an address in the given tensor type
-
-