Package com.yahoo.tensor
Class TensorType.Dimension
java.lang.Object
com.yahoo.tensor.TensorType.Dimension
- All Implemented Interfaces:
Comparable<TensorType.Dimension>
- Direct Known Subclasses:
TensorType.IndexedBoundDimension
,TensorType.IndexedUnboundDimension
,TensorType.MappedDimension
- Enclosing class:
- TensorType
public abstract static class TensorType.Dimension
extends Object
implements Comparable<TensorType.Dimension>
A tensor dimension.
Dimensions have the natural order of their names.
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(TensorType.Dimension other) boolean
int
hashCode()
static TensorType.Dimension
static TensorType.Dimension
boolean
Returns true if this is an indexed bound or unbound typeboolean
isMapped()
Returns true if this is of the mapped typestatic TensorType.Dimension
final String
name()
size()
Returns the size of this dimension if it is bound, empty otherwise Beware not use == != when comparing size.abstract String
toString()
abstract TensorType.Dimension.Type
type()
abstract TensorType.Dimension
Returns a copy of this with the name set to the given name
-
Method Details
-
name
-
size
Returns the size of this dimension if it is bound, empty otherwise Beware not use == != when comparing size. Use equals -
type
-
withName
Returns a copy of this with the name set to the given name -
isIndexed
public boolean isIndexed()Returns true if this is an indexed bound or unbound type -
isMapped
public boolean isMapped()Returns true if this is of the mapped type -
toString
-
equals
-
hashCode
public int hashCode() -
compareTo
- Specified by:
compareTo
in interfaceComparable<TensorType.Dimension>
-
indexed
-
indexed
-
mapped
-