@Override
    public Tensor withType(TensorType other) {
        if (!this.type.isRenamableTo(type)) {
            throw new IllegalArgumentException("MixedTensor.withType: types are not compatible. Current type: '" +
                                               this.type + "', requested type: '" + type + "'");
        }
        return new MixedTensor(other, index);
    }
Returns an iterator over the values of this tensor.
The iteration order is the same as for cellIterator.
vespajlib/src/main/java/com/yahoo/tensor/MixedTensor.java