Package com.yahoo.tensor
Class PartialAddress
java.lang.Object
com.yahoo.tensor.PartialAddress
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 -
Method Summary
Modifier and TypeMethodDescriptionasAddress(TensorType type) Returns this as an address in the given tensor typedimension(int i) label(int i) Returns string label at position iReturns the string label of this dimension, or null if no label is specified for itlongnumericLabel(String dimensionName) Returns the numeric label of this dimension, or -1 if no label is specified for itobjectLabel(int i) Returns label object at position iobjectLabel(String dimensionName) Returns the label object of this dimension, or -1 if no label is specified for itintsize()toString()
-
Method Details
-
dimension
-
objectLabel
Returns the label object of this dimension, or -1 if no label is specified for it -
numericLabel
Returns the numeric label of this dimension, or -1 if no label is specified for it -
label
Returns the string label of this dimension, or null if no label is specified for it -
objectLabel
Returns label object at position i- Throws:
IllegalArgumentException- if i is out of bounds
-
label
Returns string label at position i- Throws:
IllegalArgumentException- if i is out of bounds
-
size
public int size() -
asAddress
Returns this as an address in the given tensor type -
toString
-