Package com.yahoo.tensor
Class IndexedTensor.Indexes
- java.lang.Object
-
- com.yahoo.tensor.IndexedTensor.Indexes
-
- Enclosing class:
- IndexedTensor
public abstract static class IndexedTensor.Indexes extends java.lang.Object
An array of indexes into this tensor which are able to find the next index in the value order. next() can be called once per element in the dimensions we iterate over. It must be called once before accessing the first position.
-
-
Field Summary
Fields Modifier and Type Field Description protected long[]
indexes
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description long[]
indexesCopy()
long[]
indexesForReading()
Returns a copy of the indexes of this which must not be modifiedabstract void
next()
static IndexedTensor.Indexes
of(DimensionSizes sizes)
abstract long
size()
java.util.List<java.lang.Long>
toList()
Returns an immutable list containing a copy of the indexes in thisjava.lang.String
toString()
-
-
-
Method Detail
-
of
public static IndexedTensor.Indexes of(DimensionSizes sizes)
-
indexesCopy
public long[] indexesCopy()
-
indexesForReading
public long[] indexesForReading()
Returns a copy of the indexes of this which must not be modified
-
toList
public java.util.List<java.lang.Long> toList()
Returns an immutable list containing a copy of the indexes in this
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
size
public abstract long size()
-
next
public abstract void next()
-
-