diff options
Diffstat (limited to 'vespajlib/src/main/java/com/yahoo/tensor/IndexedDoubleTensor.java')
-rw-r--r-- | vespajlib/src/main/java/com/yahoo/tensor/IndexedDoubleTensor.java | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/vespajlib/src/main/java/com/yahoo/tensor/IndexedDoubleTensor.java b/vespajlib/src/main/java/com/yahoo/tensor/IndexedDoubleTensor.java index c9e5be31c15..285837a1bc6 100644 --- a/vespajlib/src/main/java/com/yahoo/tensor/IndexedDoubleTensor.java +++ b/vespajlib/src/main/java/com/yahoo/tensor/IndexedDoubleTensor.java @@ -22,17 +22,13 @@ class IndexedDoubleTensor extends IndexedTensor { return values.length; } - /** - * Returns the value at the given index by direct lookup. Only use - * if you know the underlying data layout. - * - * @param valueIndex the direct index into the underlying data. - * @throws IndexOutOfBoundsException if index is out of bounds - */ @Override public double get(long valueIndex) { return values[(int)valueIndex]; } @Override + public float getFloat(long valueIndex) { return (float)get(valueIndex); } + + @Override public IndexedTensor withType(TensorType type) { throwOnIncompatibleType(type); return new IndexedDoubleTensor(type, dimensionSizes(), values); |