diff options
Diffstat (limited to 'vespajlib/src/main/java/com/yahoo/tensor/Tensor.java')
-rw-r--r-- | vespajlib/src/main/java/com/yahoo/tensor/Tensor.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/vespajlib/src/main/java/com/yahoo/tensor/Tensor.java b/vespajlib/src/main/java/com/yahoo/tensor/Tensor.java index 7f9b2a67376..3133752bc49 100644 --- a/vespajlib/src/main/java/com/yahoo/tensor/Tensor.java +++ b/vespajlib/src/main/java/com/yahoo/tensor/Tensor.java @@ -67,9 +67,12 @@ public interface Tensor { /** Returns the number of cells in this */ long size(); - /** Returns the value of a cell, or NaN if this cell does not exist/have no value */ + /** Returns the value of a cell, or 0.0 if this cell does not exist */ double get(TensorAddress address); + /** Returns true if this cell exists */ + boolean has(TensorAddress address); + /** * Returns the cell of this in some undefined order. * A cell instances is only valid until next() is called. |